From 281ea91ee556402cbba5d890daa4a44c4c069da2 Mon Sep 17 00:00:00 2001 From: Eric Katzfey Date: Mon, 28 Oct 2024 19:56:24 -0700 Subject: [PATCH] ArduCopter: Update clang pragma to check for the version of clang that introduces the warning AP_Arming: Update clang pragma to check for the version of clang that introduces the warning --- ArduCopter/AP_Arming.cpp | 2 +- libraries/AP_Arming/AP_Arming.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ArduCopter/AP_Arming.cpp b/ArduCopter/AP_Arming.cpp index e33abf569d..6ef06d4216 100644 --- a/ArduCopter/AP_Arming.cpp +++ b/ArduCopter/AP_Arming.cpp @@ -1,7 +1,7 @@ #include "Copter.h" #pragma GCC diagnostic push -#if defined(__clang__) +#if defined(__clang_major__) && __clang_major__ >= 14 #pragma GCC diagnostic ignored "-Wbitwise-instead-of-logical" #endif diff --git a/libraries/AP_Arming/AP_Arming.cpp b/libraries/AP_Arming/AP_Arming.cpp index 8ff983a692..ffa148d6b5 100644 --- a/libraries/AP_Arming/AP_Arming.cpp +++ b/libraries/AP_Arming/AP_Arming.cpp @@ -175,7 +175,7 @@ extern AP_IOMCU iomcu; #endif #pragma GCC diagnostic push -#if defined (__clang__) +#if defined(__clang_major__) && __clang_major__ >= 14 #pragma GCC diagnostic ignored "-Wbitwise-instead-of-logical" #endif