From abb96a4e7cc9e0ad72230200843529eec0e0efc1 Mon Sep 17 00:00:00 2001 From: Aleksey Kontsevich Date: Fri, 22 May 2020 16:53:31 +0300 Subject: [PATCH] -Waddress-of-packed-member build error fix Also fixed custom build --- custom-example/custom.pri | 2 +- custom-example/src/FirmwarePlugin/CustomFirmwarePlugin.cc | 1 + src/Vehicle/Vehicle.h | 5 +++++ src/uas/UAS.h | 5 +++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/custom-example/custom.pri b/custom-example/custom.pri index 5f68ac774..f336b25d2 100644 --- a/custom-example/custom.pri +++ b/custom-example/custom.pri @@ -42,7 +42,7 @@ DEFINES += QGC_ORG_NAME=\"\\\"qgroundcontrol.org\\\"\" DEFINES += QGC_ORG_DOMAIN=\"\\\"org.qgroundcontrol\\\"\" QGC_APP_NAME = "Custom QGroundControl" -QGC_BINARY_NAME = "CustomQGroundControl" +QGC_BINARY_NAME = "MyGroundStation" QGC_ORG_NAME = "Custom" QGC_ORG_DOMAIN = "org.custom" QGC_APP_DESCRIPTION = "Custom QGroundControl" diff --git a/custom-example/src/FirmwarePlugin/CustomFirmwarePlugin.cc b/custom-example/src/FirmwarePlugin/CustomFirmwarePlugin.cc index 6d0a30adc..397e6bea5 100644 --- a/custom-example/src/FirmwarePlugin/CustomFirmwarePlugin.cc +++ b/custom-example/src/FirmwarePlugin/CustomFirmwarePlugin.cc @@ -52,4 +52,5 @@ bool CustomFirmwarePlugin::hasGimbal(Vehicle* /*vehicle*/, bool& rollSupported, rollSupported = false; pitchSupported = true; yawSupported = true; + return true; } diff --git a/src/Vehicle/Vehicle.h b/src/Vehicle/Vehicle.h index b86335c35..14ecd4a40 100644 --- a/src/Vehicle/Vehicle.h +++ b/src/Vehicle/Vehicle.h @@ -9,6 +9,11 @@ #pragma once +#if __GNUC__ > 8 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Waddress-of-packed-member" +#endif + #include #include #include diff --git a/src/uas/UAS.h b/src/uas/UAS.h index 9a38b6d59..331eb4f28 100644 --- a/src/uas/UAS.h +++ b/src/uas/UAS.h @@ -13,6 +13,11 @@ #pragma once +#if __GNUC__ > 8 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Waddress-of-packed-member" +#endif + #include "UASInterface.h" #include #include -- 2.22.0