From caf5e39c2e68553101519fb4ce3664a73032d3a3 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Tue, 22 Aug 2017 07:20:55 -0400 Subject: Fix compiler warnings for clang/mac OS X --- libqpdf/SecureRandomDataProvider.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'libqpdf/SecureRandomDataProvider.cc') 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, -- cgit v1.2.3-54-g00ecf