From 9bbc62f5a059a29c001ca44f6756a54c2a3f9201 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Wed, 14 Mar 2018 15:16:49 +0300 Subject: [PATCH] mdbx: refine internal warnings control. --- src/bits.h | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/bits.h b/src/bits.h index 64b8d237..bc60638e 100644 --- a/src/bits.h +++ b/src/bits.h @@ -89,27 +89,28 @@ #endif /* __SANITIZE_THREAD__ */ #if __has_warning("-Wconstant-logical-operand") -#if defined(__clang__) -#pragma clang diagnostic ignored "-Wconstant-logical-operand" -#elif defined(__GNUC__) -#pragma GCC diagnostic ignored "-Wconstant-logical-operand" -#else -#pragma warning disable "constant-logical-operand" -#endif +# if defined(__clang__) +# pragma clang diagnostic ignored "-Wconstant-logical-operand" +# elif defined(__GNUC__) +# pragma GCC diagnostic ignored "-Wconstant-logical-operand" +# else +# pragma warning disable "constant-logical-operand" +# endif #endif /* -Wconstant-logical-operand */ -#if __has_warning("-Walignment-reduction-ignored") || defined(__e2k__) || defined(__ICC) -#if defined(__LCC__) -#pragma diag_suppress alignment_reduction_ignored +#if defined(__LCC__) && (__LCC__ <= 121) + /* bug #2798 */ +# pragma diag_suppress alignment_reduction_ignored #elif defined(__ICC) -#pragma warning(disable: 3453 1366) -#elif defined(__clang__) -#pragma clang diagnostic ignored "-Walignment-reduction-ignored" -#elif defined(__GNUC__) -#pragma GCC diagnostic ignored "-Walignment-reduction-ignored" -#else -#pragma warning disable "alignment-reduction-ignored" -#endif +# pragma warning(disable: 3453 1366) +#elif __has_warning("-Walignment-reduction-ignored") +# if defined(__clang__) +# pragma clang diagnostic ignored "-Walignment-reduction-ignored" +# elif defined(__GNUC__) +# pragma GCC diagnostic ignored "-Walignment-reduction-ignored" +# else +# pragma warning disable "alignment-reduction-ignored" +# endif #endif /* -Wno-constant-logical-operand */ #include "./osal.h"