aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/SecureRandomDataProvider.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/SecureRandomDataProvider.cc
parent6884ad2eadff6795def2dd336a871227bc8c7d7e (diff)
downloadqpdf-caf5e39c2e68553101519fb4ce3664a73032d3a3.tar.zst
Fix compiler warnings for clang/mac OS X
Diffstat (limited to 'libqpdf/SecureRandomDataProvider.cc')
-rw-r--r--libqpdf/SecureRandomDataProvider.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/libqpdf/SecureRandomDataProvider.cc b/libqpdf/SecureRandomDataProvider.cc
index ca891036..1720b875 100644
--- a/libqpdf/SecureRandomDataProvider.cc
+++ b/libqpdf/SecureRandomDataProvider.cc
@@ -48,18 +48,16 @@ class WindowsCryptProvider
PROV_RSA_FULL,
0))
{
-#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"
# pragma GCC diagnostic ignored "-Wsign-compare"
-# endif
#endif
if (GetLastError() == NTE_BAD_KEYSET)
-#ifdef __GNUC__
-# if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406
+#if ((defined(__GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) || \
+ defined(__clang__))
# pragma GCC diagnostic pop
-# endif
#endif
{
if (! CryptAcquireContext(&crypt_prov,