From b1362e26c7375a6fe3f30437b23e6e9fc28e35ab Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 7 Apr 2025 19:44:45 +0900 Subject: [PATCH] [ruby/json] Suppress -Wunknown-pragmas warnings https://github.com/ruby/json/commit/97f47d1cfd --- ext/json/vendor/jeaiii-ltoa.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/json/vendor/jeaiii-ltoa.h b/ext/json/vendor/jeaiii-ltoa.h index c8e2a1288c..1a1337ad7d 100644 --- a/ext/json/vendor/jeaiii-ltoa.h +++ b/ext/json/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_ -