summaryrefslogtreecommitdiffstats
path: root/src/read_config_yy.y
diff options
context:
space:
mode:
authorJeremy Sowden <jeremy@azazel.net>2023-08-26 17:32:25 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2023-08-28 17:17:52 +0200
commite8b6646b2487b84789d1f06f5c948337a91d1230 (patch)
tree051010c8431536633b186d89bf1d2a334e74af89 /src/read_config_yy.y
parentf9108a3527f133f39c896ea051565d32a3755036 (diff)
read_config_yy: correct `yyerror` prototype
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@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/read_config_yy.y')
-rw-r--r--src/read_config_yy.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/read_config_yy.y b/src/read_config_yy.y
index f06c6af..be927c0 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);