Merge pull request #1973 from rgerhards/less-pragmas-grammar

remove the number of warning-avoidance pragmas
This commit is contained in:
Rainer Gerhards 2017-11-07 13:20:41 +01:00 committed by GitHub
commit 43a5e2e96f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 9 deletions

View File

@ -27,14 +27,7 @@
* limitations under the License.
*/
%{
#if !defined(_AIX)
/* 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"
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif
#define IN_GRAMMAR_Y /* tell parserif.h not to redefine things! */
#include "config.h"
#include <stdio.h>

View File

@ -20,13 +20,15 @@
#define PARSERIF_H_DEFINED
#include "rainerscript.h"
int cnfSetLexFile(char*);
int yyparse(void);
void parser_errmsg(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
void parser_warnmsg(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
void tellLexEndParsing(void);
#ifndef IN_GRAMMAR_Y
int yyparse(void);
extern int yydebug;
extern int yylineno;
extern char *cnfcurrfn;
#endif
/* entry points to be called after the parser has processed the
* element in question. Actual processing must than be done inside