yyerror should be void.

This commit is contained in:
nicm
2025-07-19 19:30:37 +00:00
parent 6378c87d15
commit 6549aaf393

View File

@ -32,7 +32,7 @@
static int yylex(void);
static int yyparse(void);
static int printflike(1,2) yyerror(const char *, ...);
static void printflike(1,2) yyerror(const char *, ...);
static char *yylex_token(int);
static char *yylex_format(void);
@ -1127,7 +1127,7 @@ cmd_parse_from_arguments(struct args_value *values, u_int count,
return (&pr);
}
static int printflike(1, 2)
static void printflike(1, 2)
yyerror(const char *fmt, ...)
{
struct cmd_parse_state *ps = &parse_state;
@ -1136,7 +1136,7 @@ yyerror(const char *fmt, ...)
char *error;
if (ps->error != NULL)
return (0);
return;
va_start(ap, fmt);
xvasprintf(&error, fmt, ap);
@ -1144,7 +1144,6 @@ yyerror(const char *fmt, ...)
ps->error = cmd_parse_get_error(pi->file, pi->line, error);
free(error);
return (0);
}
static int