--- checkpolicy/module_compiler.c | 4 ++-- checkpolicy/policy_define.c | 6 +++--- checkpolicy/policy_parse.y | 4 ++-- checkpolicy/policy_scan.l | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/checkpolicy/module_compiler.c b/checkpolicy/module_compiler.c index cdb361e04766..8ac81f78f4e2 100644 --- a/checkpolicy/module_compiler.c +++ b/checkpolicy/module_compiler.c @@ -39,9 +39,9 @@ typedef struct scope_stack { extern policydb_t *policydbp; extern queue_t id_queue; -extern int yyerror(char *msg); +extern int yyerror(const char *msg); __attribute__ ((format(printf, 1, 2))) -extern void yyerror2(char *fmt, ...); +extern void yyerror2(const char *fmt, ...); static int push_stack(int stack_type, ...); static void pop_stack(void); diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c index cf3245a17d60..7e6091e41179 100644 --- a/checkpolicy/policy_define.c +++ b/checkpolicy/policy_define.c @@ -63,8 +63,8 @@ extern unsigned long source_lineno; extern unsigned int policydb_errors; extern char source_file[PATH_MAX]; -extern int yywarn(char *msg); -extern int yyerror(char *msg); +extern int yywarn(const char *msg); +extern int yyerror(const char *msg); #define ERRORMSG_LEN 255 static char errormsg[ERRORMSG_LEN + 1] = {0}; @@ -82,7 +82,7 @@ void init_parser(int pass_number) } __attribute__ ((format(printf, 1, 2))) -void yyerror2(char *fmt, ...) +void yyerror2(const char *fmt, ...) { va_list ap; va_start(ap, fmt); diff --git a/checkpolicy/policy_parse.y b/checkpolicy/policy_parse.y index b40f4137378a..d31773a412e7 100644 --- a/checkpolicy/policy_parse.y +++ b/checkpolicy/policy_parse.y @@ -58,8 +58,8 @@ extern unsigned int pass; extern char yytext[]; extern int yylex(void); -extern int yywarn(char *msg); -extern int yyerror(char *msg); +extern int yywarn(const char *msg); +extern int yyerror(const char *msg); typedef int (* require_func_t)(); diff --git a/checkpolicy/policy_scan.l b/checkpolicy/policy_scan.l index 454bb84a8995..131613faa422 100644 --- a/checkpolicy/policy_scan.l +++ b/checkpolicy/policy_scan.l @@ -35,7 +35,7 @@ typedef int (* require_func_t)(); static char linebuf[2][255]; static unsigned int lno = 0; -int yywarn(char *msg); +int yywarn(const char *msg); void set_source_file(const char *name); @@ -272,7 +272,7 @@ LOW { return(LOW); } "*" { return(yytext[0]); } . { yywarn("unrecognized character");} %% -int yyerror(char *msg) +int yyerror(const char *msg) { if (source_file[0]) fprintf(stderr, "%s:%ld:", @@ -288,7 +288,7 @@ int yyerror(char *msg) return -1; } -int yywarn(char *msg) +int yywarn(const char *msg) { if (source_file[0]) fprintf(stderr, "%s:%ld:", -- 2.1.0 _______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.