blob: b340d55707095464586cb7bd8ced9967903ad8fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
grub_script.yy.c: In function 'yy_fatal_error':
grub_script.yy.c:18:22: error: statement with no effect [-Werror=unused-value]
^
grub_script.yy.c:2366:2: note: in expansion of macro 'fprintf'
(void)yyg;
^~~~~~~
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@intel.com>
From c36c2a86404f373100775305f532c09d46f3c6ce Mon Sep 17 00:00:00 2001
From: Vladimir Serbinenko <phcoder@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 95b2191..7b44c37 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
--
cgit v1.0-41-gc330
|