diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-09-21 14:37:20 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-09-21 14:37:20 +0000 |
commit | 02c2b2e2c1f00151ac2099ff68efda2ac89271a0 (patch) | |
tree | b76c4146efd5357b7e89db353ccebf4bdefa8e7b /main/ast_expr2.fl | |
parent | ec43deabe7d576aca83ebbda30dfc0290e38ef3c (diff) |
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
Diffstat (limited to 'main/ast_expr2.fl')
-rw-r--r-- | main/ast_expr2.fl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/ast_expr2.fl b/main/ast_expr2.fl index 5990a66ed..db09850b8 100644 --- a/main/ast_expr2.fl +++ b/main/ast_expr2.fl @@ -89,7 +89,7 @@ struct parse_io void ast_yyset_column(int column_no, yyscan_t yyscanner); int ast_yyget_column(yyscan_t yyscanner); static int curlycount = 0; -static char *expr2_token_subst(char *mess); +static char *expr2_token_subst(const char *mess); %} %option prefix="ast_yy" @@ -323,11 +323,11 @@ static char *expr2_token_equivs2[] = }; -static char *expr2_token_subst(char *mess) +static char *expr2_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 expr2_token_equivs_entries = sizeof(expr2_token_equivs1)/sizeof(char*); @@ -372,7 +372,7 @@ int ast_yyerror (const char *s, yyltype *loc, struct parse_io *parseio ) char spacebuf[8000]; /* best safe than sorry */ char spacebuf2[8000]; /* best safe than sorry */ int i=0; - char *s2 = expr2_token_subst((char *)s); + char *s2 = expr2_token_subst(s); spacebuf[0] = 0; for(i=0;i< (int)(yytext - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf);i++) spacebuf2[i] = ' '; /* uh... assuming yyg is defined, then I can use the yycolumn macro, |