dmx: Silence lex/yacc-related config parser warnings

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2015-12-08 15:37:12 -05:00
parent 718223d274
commit 2730ccb803
6 changed files with 8 additions and 5 deletions

View File

@ -48,7 +48,7 @@
#include "dmxstat.h"
#include "parser.h"
extern int yyparse(void);
extern int yydebug;
extern FILE *yyin;
static char *dmxXkbRules;

View File

@ -200,8 +200,6 @@ typedef struct _DMXConfigEntry {
extern DMXConfigEntryPtr dmxConfigEntry;
extern int yylex(void);
extern int yydebug;
extern void yyerror(const char *message);
extern void dmxConfigLog(const char *format, ...) _X_ATTRIBUTE_PRINTF(1,0);

View File

@ -38,6 +38,7 @@
#include "dmxcompat.h"
extern int yyparse(void);
extern int yydebug;
extern FILE *yyin;
int

View File

@ -44,6 +44,7 @@
#define YYERROR_VERBOSE
#define YY_USE_PROTOS
extern int yylex(void);
DMXConfigEntryPtr dmxConfigEntry = NULL;
#define APPEND(type, h, t) \
{ \

View File

@ -84,10 +84,12 @@ param return gettoken(T_PARAM, yytext, yyleng);
%%
int yywrap(void)
{
(void) &yyunput;
(void) &input;
return 1;
}
void yyerror(const char *message)
_X_NORETURN void yyerror(const char *message)
{
const char *pt, *end;
struct _entry {
@ -109,7 +111,7 @@ void yyerror(const char *message)
};
fprintf(stderr, "parse error on line %d at token \"%*.*s\"\n",
lineno, yyleng, yyleng, yytext);
lineno, (int)yyleng, (int)yyleng, yytext);
end = message + strlen(message);
for (pt = message; *pt; pt++) {
if (pt[0] == 'T' && pt[1] == '_') {

View File

@ -53,6 +53,7 @@
#include "dmxlog.h"
extern int yyparse(void);
extern int yydebug;
extern FILE *yyin;
#define DMX_INFO "xdmxconfig v0.9\nCopyright 2002 Red Hat Inc.\n"