Skip to contentSkip to conversation

checkpolicy: add missing forward declaration

PATCH In review Christian Göttsche 3 participants 3 messages Mar 23, 2020 – Mar 25, 2020 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 checkpolicy: add missing forward declaration

policy_scan.l:294:3: warning: implicit declaration of function 'yyerror' is

invalid in C99 [-Wimplicit-function-declaration]

{ yyerror("unrecognized character");}

^

policy_scan.l:294:3: warning: this function declaration is not a prototype

[-Wstrict-prototypes]

---
 checkpolicy/policy_scan.l | 1 +
 1 file changed, 1 insertion(+)
checkpolicy/policy_scan.l +1 -0
index 094645d1..4067268b 100644
@@ -37,6 +37,7 @@ typedef int (* require_func_t)(void);
 static char linebuf[2][255];
 static unsigned int lno = 0;
 int werror = 0;
+int yyerror(const char *msg);
 int yywarn(const char *msg);
 
 void set_source_file(const char *name);
Signature · 1 line
2.26.0.rc2
Acked-by on v1 1/1
#1 lore raw
Quoted 35 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Christian Göttsche
Sent: Monday, March 23, 2020 1:27 PM
To: [email protected]
Subject: [PATCH] checkpolicy: add missing forward declaration

policy_scan.l:294:3: warning: implicit declaration of function 'yyerror' is

invalid in C99 [-Wimplicit-function-declaration]

{ yyerror("unrecognized character");}

^

policy_scan.l:294:3: warning: this function declaration is not a prototype

[-Wstrict-prototypes]

---
 checkpolicy/policy_scan.l | 1 +
 1 file changed, 1 insertion(+)
checkpolicy/policy_scan.l index renamed from checkpolicy/policy_scan.l +0 -0

094645d1..4067268b 100644

checkpolicy/policy_scan.l +1 -1
@@ -37,6 +37,7 @@ typedef int (* require_func_t)(void);  static char
 linebuf[2][255];  static unsigned int lno = 0;  int werror = 0;
+int yyerror(const char *msg);
 int yywarn(const char *msg);
 
 void set_source_file(const char *name);
--
Quoted 1 line

2.26.0.rc2

#2 lore raw
Quoted 34 lines · William C
Quoted 34 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Christian Göttsche
Sent: Monday, March 23, 2020 1:27 PM
To: [email protected]
Subject: [PATCH] checkpolicy: add missing forward declaration

policy_scan.l:294:3: warning: implicit declaration of function 'yyerror' is

invalid in C99 [-Wimplicit-function-declaration]

{ yyerror("unrecognized character");}

^

policy_scan.l:294:3: warning: this function declaration is not a prototype

[-Wstrict-prototypes]

---
 checkpolicy/policy_scan.l | 1 +
 1 file changed, 1 insertion(+)
checkpolicy/policy_scan.l index renamed from checkpolicy/policy_scan.l +0 -0

094645d1..4067268b 100644

checkpolicy/policy_scan.l +1 -0
@@ -37,6 +37,7 @@ typedef int (* require_func_t)(void);  static char
 linebuf[2][255];  static unsigned int lno = 0;  int werror = 0;
+int yyerror(const char *msg);
 int yywarn(const char *msg);
 
Quoted 5 lines
Quoted 3 lines
checkpolicy/policy_scan.l +0 -1
 void set_source_file(const char *name);
--

2.26.0.rc2

Merged: https://github.com/SELinuxProject/selinux/pull/212