diff --git a/librz/arch/isa/arm/arm_esil32.c b/librz/arch/isa/arm/arm_esil32.c index 87f08cb0632..2399827765d 100644 --- a/librz/arch/isa/arm/arm_esil32.c +++ b/librz/arch/isa/arm/arm_esil32.c @@ -2,8 +2,15 @@ // SPDX-License-Identifier: LGPL-3.0-only #include + +#if CC_SUPPORTS_W_ENUM_COMPARE #pragma GCC diagnostic ignored "-Wenum-compare" +#endif + +#ifdef CC_SUPPORTS_W_ENUM_CONVERION #pragma GCC diagnostic ignored "-Wenum-conversion" +#endif + #define CAPSTONE_AARCH64_COMPAT_HEADER #include diff --git a/librz/arch/isa/arm/arm_esil64.c b/librz/arch/isa/arm/arm_esil64.c index b9e79f5d8ce..183c48cdb1b 100644 --- a/librz/arch/isa/arm/arm_esil64.c +++ b/librz/arch/isa/arm/arm_esil64.c @@ -3,8 +3,14 @@ #include +#if CC_SUPPORTS_W_ENUM_COMPARE #pragma GCC diagnostic ignored "-Wenum-compare" +#endif + +#ifdef CC_SUPPORTS_W_ENUM_CONVERION #pragma GCC diagnostic ignored "-Wenum-conversion" +#endif + #define CAPSTONE_AARCH64_COMPAT_HEADER #include diff --git a/librz/arch/isa/arm/arm_il64.c b/librz/arch/isa/arm/arm_il64.c index 755dca5c087..fc92a4fa8f6 100644 --- a/librz/arch/isa/arm/arm_il64.c +++ b/librz/arch/isa/arm/arm_il64.c @@ -3,8 +3,14 @@ #include +#if CC_SUPPORTS_W_ENUM_COMPARE #pragma GCC diagnostic ignored "-Wenum-compare" +#endif + +#ifdef CC_SUPPORTS_W_ENUM_CONVERION #pragma GCC diagnostic ignored "-Wenum-conversion" +#endif + #define CAPSTONE_AARCH64_COMPAT_HEADER #include diff --git a/librz/arch/p/analysis/analysis_arm_cs.c b/librz/arch/p/analysis/analysis_arm_cs.c index 198f23e5e97..4a2cee72a14 100644 --- a/librz/arch/p/analysis/analysis_arm_cs.c +++ b/librz/arch/p/analysis/analysis_arm_cs.c @@ -5,8 +5,14 @@ #include #include +#if CC_SUPPORTS_W_ENUM_COMPARE #pragma GCC diagnostic ignored "-Wenum-compare" +#endif + +#ifdef CC_SUPPORTS_W_ENUM_CONVERION #pragma GCC diagnostic ignored "-Wenum-conversion" +#endif + #define CAPSTONE_AARCH64_COMPAT_HEADER #include #include diff --git a/librz/arch/p/analysis/analysis_sysz.c b/librz/arch/p/analysis/analysis_sysz.c index 4825c561f81..dc7e95104d4 100644 --- a/librz/arch/p/analysis/analysis_sysz.c +++ b/librz/arch/p/analysis/analysis_sysz.c @@ -3,8 +3,15 @@ #include #include + +#if CC_SUPPORTS_W_ENUM_COMPARE #pragma GCC diagnostic ignored "-Wenum-compare" +#endif + +#ifdef CC_SUPPORTS_W_ENUM_CONVERION #pragma GCC diagnostic ignored "-Wenum-conversion" +#endif + #define CAPSTONE_SYSTEMZ_COMPAT_HEADER #include #include diff --git a/librz/arch/p/asm/asm_arm_cs.c b/librz/arch/p/asm/asm_arm_cs.c index 02c577c350e..f875e3186c1 100644 --- a/librz/arch/p/asm/asm_arm_cs.c +++ b/librz/arch/p/asm/asm_arm_cs.c @@ -4,8 +4,15 @@ #include #include #include + +#if CC_SUPPORTS_W_ENUM_COMPARE #pragma GCC diagnostic ignored "-Wenum-compare" +#endif + +#ifdef CC_SUPPORTS_W_ENUM_CONVERION #pragma GCC diagnostic ignored "-Wenum-conversion" +#endif + #define CAPSTONE_AARCH64_COMPAT_HEADER #include #include "arm/asm-arm.h" diff --git a/librz/arch/p/asm/cs_helper.h b/librz/arch/p/asm/cs_helper.h index 5666a67edd7..93abfd1fb78 100644 --- a/librz/arch/p/asm/cs_helper.h +++ b/librz/arch/p/asm/cs_helper.h @@ -3,8 +3,15 @@ // SPDX-License-Identifier: LGPL-3.0-only #include + +#if CC_SUPPORTS_W_ENUM_COMPARE #pragma GCC diagnostic ignored "-Wenum-compare" +#endif + +#ifdef CC_SUPPORTS_W_ENUM_CONVERION #pragma GCC diagnostic ignored "-Wenum-conversion" +#endif + #define CAPSTONE_SYSTEMZ_COMPAT_HEADER #include