diff options
author | Jay Berkenbilt <ejb@ql.org> | 2013-03-27 22:36:28 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2013-03-27 22:36:28 +0100 |
commit | 8e636ea6806ab5d1f1d05bafd0a192dad06d42b6 (patch) | |
tree | f9cc46d12bb2ca533364def909c95eb501f41625 | |
parent | e8ddac89501e232205e1737a07ddb7d1c2425e4b (diff) | |
download | qpdf-8e636ea6806ab5d1f1d05bafd0a192dad06d42b6.tar.zst |
Protect gcc diagnostic pragmas with gcc version
Versions prior to 4.6 didn't allow gcc diagnostic pragmas with push
and pop and to appear anywhere in the file. Just let the warning be
there for those versions.
-rw-r--r-- | libqpdf/Pl_Flate.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libqpdf/Pl_Flate.cc b/libqpdf/Pl_Flate.cc index be8ca8ba..297cdac7 100644 --- a/libqpdf/Pl_Flate.cc +++ b/libqpdf/Pl_Flate.cc @@ -77,8 +77,10 @@ Pl_Flate::handleData(unsigned char* data, int len, int flush) // deflateInit and inflateInit are macros that use old-style // casts. #ifdef __GNUC__ +# if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wold-style-cast" +# endif #endif if (this->action == a_deflate) { @@ -89,7 +91,9 @@ Pl_Flate::handleData(unsigned char* data, int len, int flush) err = inflateInit(&zstream); } #ifdef __GNUC__ +# if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 # pragma GCC diagnostic pop +# endif #endif checkError("Init", err); |