[buddy]
Get rid of some "deprecated conversion from string constant to `char*'" warnings. * examples/bddcalc/parser_.h (yyerror): Declare the format as a "const char*". * examples/bddcalc/parser.yxx (yyerror): Likewise.
This commit is contained in:
parent
919fc298ff
commit
e828783f47
3 changed files with 12 additions and 3 deletions
|
|
@ -1,3 +1,12 @@
|
||||||
|
2010-01-22 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||||
|
|
||||||
|
Get rid of some "deprecated conversion from string constant to
|
||||||
|
`char*'" warnings.
|
||||||
|
|
||||||
|
* examples/bddcalc/parser_.h (yyerror): Declare the format
|
||||||
|
as a "const char*".
|
||||||
|
* examples/bddcalc/parser.yxx (yyerror): Likewise.
|
||||||
|
|
||||||
2010-01-21 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
2010-01-21 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||||
|
|
||||||
* src/bddio.c (bdd_load): Check the return value of fscanf() to
|
* src/bddio.c (bdd_load): Check the return value of fscanf() to
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,7 @@ int main(int ac, char **av)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void yyerror(char *fmt, ...)
|
void yyerror(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list argp;
|
va_list argp;
|
||||||
va_start(argp,fmt);
|
va_start(argp,fmt);
|
||||||
|
|
|
||||||
|
|
@ -27,14 +27,14 @@ struct token /* BISON token data */
|
||||||
#define yywrap() (1)
|
#define yywrap() (1)
|
||||||
|
|
||||||
extern YYSTYPE yylval; /* Declare for flex user */
|
extern YYSTYPE yylval; /* Declare for flex user */
|
||||||
extern void yyerror(char *,...); /* Declare for flex and bison */
|
extern void yyerror(const char *,...); /* Declare for flex and bison */
|
||||||
extern FILE *yyin;
|
extern FILE *yyin;
|
||||||
extern int yylex(void); /* Declare for bison */
|
extern int yylex(void); /* Declare for bison */
|
||||||
extern int yyparse(void); /* Declare for bison user */
|
extern int yyparse(void); /* Declare for bison user */
|
||||||
extern int linenum; /* Declare for error handler */
|
extern int linenum; /* Declare for error handler */
|
||||||
|
|
||||||
/* Use this instead of strdup() to avoid malloc() */
|
/* Use this instead of strdup() to avoid malloc() */
|
||||||
inline char *sdup(const char *s)
|
inline char *sdup(const char *s)
|
||||||
{
|
{
|
||||||
return strcpy(new char[strlen(s)+1], s);
|
return strcpy(new char[strlen(s)+1], s);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue