From 02c2b2e2c1f00151ac2099ff68efda2ac89271a0 Mon Sep 17 00:00:00 2001 From: russell Date: Fri, 21 Sep 2007 14:37:20 +0000 Subject: gcc 4.2 has a new set of warnings dealing with cosnt pointers. This set of changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2. (closes issue #10774, patch from qwell) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83432 f38db490-d61c-443f-a65b-d21fe96a405b --- pbx/ael/ael.tab.c | 8 ++++---- pbx/ael/ael.y | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'pbx/ael') diff --git a/pbx/ael/ael.tab.c b/pbx/ael/ael.tab.c index cca6a39be..ba66f196f 100644 --- a/pbx/ael/ael.tab.c +++ b/pbx/ael/ael.tab.c @@ -199,7 +199,7 @@ extern char *my_file; #ifdef AAL_ARGCHECK int ael_is_funcname(char *name); #endif -static char *ael_token_subst(char *mess); +static char *ael_token_subst(const char *mess); @@ -3232,11 +3232,11 @@ static char *token_equivs2[] = }; -static char *ael_token_subst(char *mess) +static char *ael_token_subst(const char *mess) { /* calc a length, malloc, fill, and return; yyerror had better free it! */ int len=0,i; - char *p; + const char *p; char *res, *s,*t; int token_equivs_entries = sizeof(token_equivs1)/sizeof(char*); @@ -3277,7 +3277,7 @@ static char *ael_token_subst(char *mess) void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s) { - char *s2 = ael_token_subst((char *)s); + char *s2 = ael_token_subst(s); if (locp->first_line == locp->last_line) { ast_log(LOG_ERROR, "==== File: %s, Line %d, Cols: %d-%d: Error: %s\n", my_file, locp->first_line, locp->first_column, locp->last_column, s2); } else { diff --git a/pbx/ael/ael.y b/pbx/ael/ael.y index 04df00c1a..7cc758d7c 100644 --- a/pbx/ael/ael.y +++ b/pbx/ael/ael.y @@ -46,7 +46,7 @@ extern char *my_file; #ifdef AAL_ARGCHECK int ael_is_funcname(char *name); #endif -static char *ael_token_subst(char *mess); +static char *ael_token_subst(const char *mess); %} @@ -705,11 +705,11 @@ static char *token_equivs2[] = }; -static char *ael_token_subst(char *mess) +static char *ael_token_subst(const char *mess) { /* calc a length, malloc, fill, and return; yyerror had better free it! */ int len=0,i; - char *p; + const char *p; char *res, *s,*t; int token_equivs_entries = sizeof(token_equivs1)/sizeof(char*); @@ -750,7 +750,7 @@ static char *ael_token_subst(char *mess) void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s) { - char *s2 = ael_token_subst((char *)s); + char *s2 = ael_token_subst(s); if (locp->first_line == locp->last_line) { ast_log(LOG_ERROR, "==== File: %s, Line %d, Cols: %d-%d: Error: %s\n", my_file, locp->first_line, locp->first_column, locp->last_column, s2); } else { -- cgit v1.2.3