>From 2ea83d3f51c42b9150b295a9e3fc3b1b5a94b1e0 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sun, 4 Jun 2017 18:47:51 +0200 Subject: [PATCH] lexer: fix a #define to avoid unused-value warning Template for the default yy_fatal_error function changed in flex 2.6.4 to remove the void cast for the fprintf call. Because script/yylex.l defines fprintf as 0, this triggered the unused-value warning, breaking compilation with -Werror (on by default). This commit avoids the warning by replacing fprintf with grub_printf instead. --- grub-core/script/yylex.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l index 95b219170..43595266f 100644 --- a/grub-core/script/yylex.l +++ b/grub-core/script/yylex.l @@ -91,7 +91,7 @@ typedef size_t yy_size_t; #define stdin 0 #define stdout 0 -#define fprintf(...) 0 +#define fprintf(stream, ...) grub_printf(__VA_ARGS__) #define exit(...) grub_fatal("fatal error in lexer") #endif -- 2.13.0