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
This commit is contained in:
Eric Katzfey 2024-10-28 19:56:24 -07:00 committed by Andrew Tridgell
parent 1e17278bda
commit 281ea91ee5
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#include "Copter.h" #include "Copter.h"
#pragma GCC diagnostic push #pragma GCC diagnostic push
#if defined(__clang__) #if defined(__clang_major__) && __clang_major__ >= 14
#pragma GCC diagnostic ignored "-Wbitwise-instead-of-logical" #pragma GCC diagnostic ignored "-Wbitwise-instead-of-logical"
#endif #endif

View File

@ -175,7 +175,7 @@ extern AP_IOMCU iomcu;
#endif #endif
#pragma GCC diagnostic push #pragma GCC diagnostic push
#if defined (__clang__) #if defined(__clang_major__) && __clang_major__ >= 14
#pragma GCC diagnostic ignored "-Wbitwise-instead-of-logical" #pragma GCC diagnostic ignored "-Wbitwise-instead-of-logical"
#endif #endif