From 971e3af8261f8a8763f998523790b827611f464b Mon Sep 17 00:00:00 2001 From: Jaaaky <43599380+Jaaaky@users.noreply.github.com> Date: Thu, 2 May 2019 12:34:52 +0300 Subject: [PATCH] GCS_MAVLink: prgama away address-of-packed-member only for g++ >= 9 --- libraries/GCS_MAVLink/GCS_MAVLink.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/GCS_MAVLink/GCS_MAVLink.h b/libraries/GCS_MAVLink/GCS_MAVLink.h index 5e96703d77..f39c9a9f36 100644 --- a/libraries/GCS_MAVLink/GCS_MAVLink.h +++ b/libraries/GCS_MAVLink/GCS_MAVLink.h @@ -29,7 +29,10 @@ */ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-align" + +#if defined(__GNUC__) && __GNUC__ >= 9 #pragma GCC diagnostic ignored "-Waddress-of-packed-member" +#endif #include "include/mavlink/v2.0/ardupilotmega/version.h"