]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Fine grainely disable warnings on lexer. Remove Wno-error on it.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 23 Oct 2011 21:32:06 +0000 (23:32 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 23 Oct 2011 21:32:06 +0000 (23:32 +0200)
* grub-core/Makefile.core.def (normal): Remove -Wno-error.
* grub-core/script/lexer.c: Declare yytext_ptr to avoid having
yylex_strncpy.
* grub-core/script/yylex.l: Add fine-grained #pragma.

ChangeLog
grub-core/Makefile.core.def
grub-core/script/lexer.c
grub-core/script/yylex.l

index 579f510b0e1166f19694d51372e14843bf4eca43..637fa622b125468c2051e6ec62172f4057fab997 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-10-23  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Fine grainely disable warnings on lexer. Remove Wno-error on it.
+
+       * grub-core/Makefile.core.def (normal): Remove -Wno-error.
+       * grub-core/script/lexer.c: Declare yytext_ptr to avoid having
+       yylex_strncpy.
+       * grub-core/script/yylex.l: Add fine-grained #pragma.
+
 2011-10-23  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/lib/posix_wrap/string.h (memcpy) [GRUB_UTIL]:
index 7cb83924ce984e35abe6b3f4ab3815ac15483c49..6d3c31ea6e35ba308f94abcfe64921ff90d0f0fc 100644 (file)
@@ -1395,7 +1395,7 @@ module = {
   extra_dist = script/yylex.l;
   extra_dist = script/parser.y;
 
-  cflags = '$(CFLAGS_POSIX) -Wno-error';
+  cflags = '$(CFLAGS_POSIX)';
   cppflags = '$(CPPFLAGS_POSIX)';
 };
 
index 98279079ff6ee775b7987c8ad8564f1863a8e267..53697c7349dc47dffde44920bb54e20773f58f3d 100644 (file)
@@ -24,6 +24,7 @@
 #include <grub/mm.h>
 #include <grub/script_sh.h>
 
+#define yytext_ptr char *
 #include "grub_script.tab.h"
 #include "grub_script.yy.h"
 
index 7195a880dc4b381f28b59721e73a672ce134566c..012d88dbc4b3c264959135e68f3daf73d4ba0d81 100644 (file)
@@ -24,6 +24,9 @@
 #include <grub/script_sh.h>
 #include "grub_script.tab.h"
 
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#pragma GCC diagnostic ignored "-Wmissing-prototypes"
+
 #define yyfree    grub_lexer_yyfree
 #define yyalloc   grub_lexer_yyalloc
 #define yyrealloc grub_lexer_yyrealloc