[PATCH conntrack-tools 3/4] read_config_yy: correct `yyerror` prototype

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Change it to take a `const char *`.  It doesn't modify the string and yacc
passes string literals, so cause compiler warnings.

Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx>
---
 src/read_config_yy.y | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/read_config_yy.y b/src/read_config_yy.y
index f06c6afff7cb..be927c049056 100644
--- a/src/read_config_yy.y
+++ b/src/read_config_yy.y
@@ -47,7 +47,7 @@ extern char *yytext;
 extern int   yylineno;
 
 int yylex (void);
-int yyerror (char *msg);
+int yyerror (const char *msg);
 void yyrestart (FILE *input_file);
 
 struct ct_conf conf;
@@ -1681,7 +1681,7 @@ helper_policy_expect_timeout: T_HELPER_EXPECT_TIMEOUT T_NUMBER
 %%
 
 int __attribute__((noreturn))
-yyerror(char *msg)
+yyerror(const char *msg)
 {
 	dlog(LOG_ERR, "parsing config file in line (%d), symbol '%s': %s",
 	     yylineno, yytext, msg);
-- 
2.40.1




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux