From 9d8fc7fd3ec43a781a610f56943cce3bec1593b0 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 23 Oct 2018 08:50:44 +0200 Subject: [PATCH] yacc.c: work around strange typing issues On the CI, both GCC and Clang report: src/parse-gram.c: In function 'yy_lac': src/parse-gram.c:1479:29: error: format '%hd' expects argument of type 'int', but argument 3 has type 'yytype_int16 {aka long int}' [-Werror=format=] YYDPRINTF ((stderr, " G%hd", yystate)); ^ Although yytype_int16 is supposed to be a short int, not a long int. This must be explored. * data/yacc.c (yy_lac): Work around typing issue. --- data/yacc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/yacc.c b/data/yacc.c index 03adcffd..d8021ef6 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -997,7 +997,7 @@ yy_lac (yytype_int16 *yyesa, yytype_int16 **yyes, } *++yyesp = yystate; } - YYDPRINTF ((stderr, " G%hd", yystate)); + YYDPRINTF ((stderr, " G%d", (int) yystate)); } } }]])[