[apparmor] [PATCH 13/13] Add const to yyerror parameter to get rid of compile warning
John Johansen
john.johansen at canonical.com
Tue Feb 14 17:32:35 UTC 2012
Signed-off-by: John Johansen <john.johansen at canonical.com>
---
parser/parser.h | 4 ++--
parser/parser_yacc.y | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/parser/parser.h b/parser/parser.h
index 31ffe75..8d3ef6c 100644
--- a/parser/parser.h
+++ b/parser/parser.h
@@ -272,7 +272,7 @@ extern void update_mru_tstamp(FILE *file);
extern FILE *yyin;
extern void yyrestart(FILE *fp);
extern int yyparse(void);
-extern void yyerror(char *msg, ...);
+extern void yyerror(const char *msg, ...);
extern int yylex(void);
/* parser_include.c */
@@ -379,7 +379,7 @@ void free_policies(void);
*/
/* parser_yacc.y */
-void yyerror(char *msg, ...)
+void yyerror(const char *msg, ...)
{
va_list arg;
char buf[PATH_MAX];
diff --git a/parser/parser_yacc.y b/parser/parser_yacc.y
index 27eacf1..14e3852 100644
--- a/parser/parser_yacc.y
+++ b/parser/parser_yacc.y
@@ -1081,7 +1081,7 @@ caps: { /* nothing */ $$ = 0; }
%%
#define MAXBUFSIZE 4096
-void yyerror(char *msg, ...)
+void yyerror(const char *msg, ...)
{
va_list arg;
char buf[MAXBUFSIZE];
--
1.7.9
More information about the AppArmor
mailing list