diff --git a/src/comm/QGCMAVLink.h b/src/comm/QGCMAVLink.h index 202fee0eb636e2bec9274eb2b8079310b6becd08..19f710bd216f3d644c272bb46539b23bee3c0426 100644 --- a/src/comm/QGCMAVLink.h +++ b/src/comm/QGCMAVLink.h @@ -22,8 +22,15 @@ // Ignore warnings from mavlink headers for both GCC/Clang and MSVC #ifdef __GNUC__ + +#if __GNUC__ > 8 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Waddress-of-packed-member" +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#endif + #else #pragma warning(push, 0) #endif