From 97f47d1cfdb93103c6381acf36c11ee7c024a8f3 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 7 Apr 2025 19:44:45 +0900 Subject: [PATCH] Suppress -Wunknown-pragmas warnings --- ext/json/ext/vendor/jeaiii-ltoa.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/json/ext/vendor/jeaiii-ltoa.h b/ext/json/ext/vendor/jeaiii-ltoa.h index c8e2a1288..1a1337ad7 100644 --- a/ext/json/ext/vendor/jeaiii-ltoa.h +++ b/ext/json/ext/vendor/jeaiii-ltoa.h @@ -35,11 +35,13 @@ SOFTWARE. typedef uint_fast32_t u32_t; typedef uint_fast64_t u64_t; +#if defined __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wshorten-64-to-32" - +#elif defined __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmissing-braces" +#endif #define u32(x) ((u32_t)(x)) #define u64(x) ((u64_t)(x)) @@ -270,8 +272,10 @@ jeaiii_ultoa(char *b, u64_t n) #undef u64 #undef COPY +#if defined __clang__ #pragma clang diagnostic pop +#elif defined __GNUC__ #pragma GCC diagnostic pop +#endif #endif // JEAIII_TO_TEXT_H_ -