From 87063ea68313893112d6a7a9217a3b5a12e61059 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 3 Jun 2016 10:43:46 +0200 Subject: [PATCH] shut off unevitable compiler warnings in lexer subsystem they are caused by generated code that we cannot change --- grammar/grammar.y | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/grammar/grammar.y b/grammar/grammar.y index ce5840ac3..9e95ed900 100644 --- a/grammar/grammar.y +++ b/grammar/grammar.y @@ -27,6 +27,12 @@ * limitations under the License. */ %{ +/* shut off warnings that we can't change anyhow */ +#pragma GCC diagnostic ignored "-Wpragmas" +#pragma GCC diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers" +#pragma GCC diagnostic ignored "-Wredundant-decls" +#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" + #include "config.h" #include #include @@ -38,8 +44,6 @@ extern int yylineno; /* keep compile rule clean of errors */ extern int yylex(void); extern int yyerror(char*); -#pragma GCC diagnostic ignored "-Wpragmas" -#pragma GCC diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers" %} %union {