aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/Pl_Flate.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2017-08-22 13:20:55 +0200
committerJay Berkenbilt <ejb@ql.org>2017-08-22 20:13:10 +0200
commitcaf5e39c2e68553101519fb4ce3664a73032d3a3 (patch)
tree232245703f0c15b7ca9fc1e1155f0bab1967d9cd /libqpdf/Pl_Flate.cc
parent6884ad2eadff6795def2dd336a871227bc8c7d7e (diff)
downloadqpdf-caf5e39c2e68553101519fb4ce3664a73032d3a3.tar.zst
Fix compiler warnings for clang/mac OS X
Diffstat (limited to 'libqpdf/Pl_Flate.cc')
-rw-r--r--libqpdf/Pl_Flate.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/libqpdf/Pl_Flate.cc b/libqpdf/Pl_Flate.cc
index 535383c9..ce4c9ed1 100644
--- a/libqpdf/Pl_Flate.cc
+++ b/libqpdf/Pl_Flate.cc
@@ -76,11 +76,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
+#if ((defined(__GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) || \
+ defined(__clang__))
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wold-style-cast"
-# endif
#endif
if (this->action == a_deflate)
{
@@ -90,10 +89,9 @@ Pl_Flate::handleData(unsigned char* data, int len, int flush)
{
err = inflateInit(&zstream);
}
-#ifdef __GNUC__
-# if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406
+#if ((defined(__GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) || \
+ defined(__clang__))
# pragma GCC diagnostic pop
-# endif
#endif
checkError("Init", err);