mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@83432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1409,7 +1409,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);
|
||||
|
||||
#line 1415 "ast_expr2f.c"
|
||||
|
||||
@@ -3229,11 +3229,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*);
|
||||
|
||||
@@ -3278,7 +3278,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,
|
||||
|
Reference in New Issue
Block a user