diff options
-rwxr-xr-x | bin/genltanalyze | 31 | ||||
-rw-r--r-- | hl/src/H5LTanalyze.c | 19 | ||||
-rw-r--r-- | hl/src/H5LTparse.c | 19 |
3 files changed, 69 insertions, 0 deletions
diff --git a/bin/genltanalyze b/bin/genltanalyze index 0b1b1e5..1f56cc1 100755 --- a/bin/genltanalyze +++ b/bin/genltanalyze @@ -60,6 +60,37 @@ flex --nounistd -PH5LTyy -oH5LTanalyze.c H5LTanalyze.l # H5LTparse.c. perl -0777 -pi -e 's/int\nyyparse/hid_t\nyyparse/igs' H5LTparse.c perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' H5LTparse.c + +# Add code that disables warnings in the flex/bison-generated code. +# +# Note that the GCC pragmas did not exist until gcc 4.2. Earlier versions +# will simply ignore them, but we want to avoid those warnings. +for f in H5LTparse.c H5LTanalyze.c +do + echo '#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2 ' >> tmp.out + echo '#pragma GCC diagnostic ignored "-Wconversion" ' >> tmp.out + echo '#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" ' >> tmp.out + echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out + echo '#pragma GCC diagnostic ignored "-Wmissing-prototypes" ' >> tmp.out + echo '#pragma GCC diagnostic ignored "-Wnested-externs" ' >> tmp.out + echo '#pragma GCC diagnostic ignored "-Wold-style-definition" ' >> tmp.out + echo '#pragma GCC diagnostic ignored "-Wsign-compare" ' >> tmp.out + echo '#pragma GCC diagnostic ignored "-Wsign-conversion" ' >> tmp.out + echo '#pragma GCC diagnostic ignored "-Wstrict-prototypes" ' >> tmp.out + echo '#pragma GCC diagnostic ignored "-Wswitch-default" ' >> tmp.out + echo '#pragma GCC diagnostic ignored "-Wunused-function" ' >> tmp.out + echo '#pragma GCC diagnostic ignored "-Wunused-macros" ' >> tmp.out + echo '#pragma GCC diagnostic ignored "-Wunused-parameter" ' >> tmp.out + echo '#elif defined __SUNPRO_CC ' >> tmp.out + echo '#pragma disable_warn ' >> tmp.out + echo '#elif defined _MSC_VER ' >> tmp.out + echo '#pragma warning(push, 1) ' >> tmp.out + echo '#endif ' >> tmp.out + + cat $f >> tmp.out + mv tmp.out $f +done + cd ../.. exit 0 diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c index d9ffb36..54e443d 100644 --- a/hl/src/H5LTanalyze.c +++ b/hl/src/H5LTanalyze.c @@ -1,3 +1,22 @@ +#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2 +#pragma GCC diagnostic ignored "-Wconversion" +#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" +#pragma GCC diagnostic ignored "-Wlarger-than=" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" +#pragma GCC diagnostic ignored "-Wnested-externs" +#pragma GCC diagnostic ignored "-Wold-style-definition" +#pragma GCC diagnostic ignored "-Wsign-compare" +#pragma GCC diagnostic ignored "-Wsign-conversion" +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wswitch-default" +#pragma GCC diagnostic ignored "-Wunused-function" +#pragma GCC diagnostic ignored "-Wunused-macros" +#pragma GCC diagnostic ignored "-Wunused-parameter" +#elif defined __SUNPRO_CC +#pragma disable_warn +#elif defined _MSC_VER +#pragma warning(push, 1) +#endif #line 2 "H5LTanalyze.c" #line 4 "H5LTanalyze.c" diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c index aa12185..6ca95c54 100644 --- a/hl/src/H5LTparse.c +++ b/hl/src/H5LTparse.c @@ -1,3 +1,22 @@ +#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2 +#pragma GCC diagnostic ignored "-Wconversion" +#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" +#pragma GCC diagnostic ignored "-Wlarger-than=" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" +#pragma GCC diagnostic ignored "-Wnested-externs" +#pragma GCC diagnostic ignored "-Wold-style-definition" +#pragma GCC diagnostic ignored "-Wsign-compare" +#pragma GCC diagnostic ignored "-Wsign-conversion" +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wswitch-default" +#pragma GCC diagnostic ignored "-Wunused-function" +#pragma GCC diagnostic ignored "-Wunused-macros" +#pragma GCC diagnostic ignored "-Wunused-parameter" +#elif defined __SUNPRO_CC +#pragma disable_warn +#elif defined _MSC_VER +#pragma warning(push, 1) +#endif /* A Bison parser, made by GNU Bison 2.7. */ /* Bison implementation for Yacc-like parsers in C |