Bug#890431: grub2 FTBFS with flex 2.6.4

Adrian Bunk bunk at debian.org
Wed Feb 14 17:29:26 UTC 2018


Source: grub2
Version: 2.02-2
Severity: serious
Tags: patch

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/grub2.html

...
grub_script.yy.c:19:22: error: statement with no effect [-Werror=unused-value]
 #define fprintf(...) 0
                      ^
grub_script.yy.c:2367:2: note: in expansion of macro 'fprintf'
  fprintf( stderr, "%s\n", msg );
  ^~~~~~~


Upstream fix attached.
-------------- next part --------------
>From c36c2a86404f373100775305f532c09d46f3c6ce Mon Sep 17 00:00:00 2001
From: Vladimir Serbinenko <phcoder at gmail.com>
Date: Mon, 14 Aug 2017 14:11:43 +0200
Subject: yylex: Explicilty cast fprintf to void.

It's needed to avoid warning on recent GCC.
---
 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..7b44c37b7 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(...) (void)0
 #define exit(...) grub_fatal("fatal error in lexer")
 #endif
 
-- 
2.11.0



More information about the Pkg-grub-devel mailing list