checkpolicy: add missing forward declaration
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
@@ -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
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 declarationpolicy_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]
Signed-off-by Christian Göttsche <[email protected]>--- checkpolicy/policy_scan.l | 1 + 1 file changed, 1 insertion(+)checkpolicy/policy_scan.l index renamed from checkpolicy/policy_scan.l +0
-0
094645d1..4067268b100644checkpolicy/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
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 declarationpolicy_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]
Signed-off-by Christian Göttsche <[email protected]>--- checkpolicy/policy_scan.l | 1 + 1 file changed, 1 insertion(+)checkpolicy/policy_scan.l index renamed from checkpolicy/policy_scan.l +0
-0
094645d1..4067268b100644checkpolicy/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
-1void set_source_file(const char *name); --2.26.0.rc2
Acked-by William Roberts <[email protected]>