Commit e828783f authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

[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.
parent 919fc298
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>
* 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_start(argp,fmt);
......
......@@ -27,14 +27,14 @@ struct token /* BISON token data */
#define yywrap() (1)
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 int yylex(void); /* Declare for bison */
extern int yyparse(void); /* Declare for bison user */
extern int linenum; /* Declare for error handler */
/* 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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment