SHA256
1
0
forked from pool/grub2
grub2/grub2-fix-build-error-on-flex-2.5.37.patch

38 lines
1.4 KiB
Diff
Raw Normal View History

From b9701a5d7a60dac218d9bb309560cd4aab57b6cd Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com>
Date: Thu, 25 Oct 2012 14:18:31 +0800
Subject: [PATCH] fix build error on flex-2.5.37
Patch-Mainline: no
New flex version 2.5.37 introduces build error like this
[ 420s] grub_script.yy.c: In function 'yy_scan_bytes':
[ 420s] grub_script.yy.c:2296:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
[ 420s] ./grub-core/script/yylex.l: At top level:
[ 420s] grub_script.yy.c:2351:13: error: 'yy_fatal_error' defined but not used [-Werror=unused-function]
[ 420s] cc1: all warnings being treated as errors
This patch ignore the two diagnostic pragmas as a temporal fix, hope
someone could dig into it and get the root cause.
---
grub-core/script/yylex.l | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l
index f6a39c5..f4ff2bd 100644
--- a/grub-core/script/yylex.l
+++ b/grub-core/script/yylex.l
@@ -29,6 +29,8 @@
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
#pragma GCC diagnostic ignored "-Wmissing-declarations"
#pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations"
+#pragma GCC diagnostic ignored "-Wsign-compare"
+#pragma GCC diagnostic ignored "-Wunused-function"
#define yyfree grub_lexer_yyfree
#define yyalloc grub_lexer_yyalloc
--
1.7.3.4