Commit ce674f46 authored by Aleksey Kontsevich's avatar Aleksey Kontsevich

Localize warnings disabling to cpp file only

parent f27dbb68
......@@ -1916,6 +1916,24 @@ void Vehicle::_handleRadioStatus(mavlink_message_t& message)
}
}
// 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"
#elif defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Waddress-of-packed-member"
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#endif
#else
#pragma warning(push, 0)
#endif
void Vehicle::_handleRCChannels(mavlink_message_t& message)
{
mavlink_rc_channels_t channels;
......@@ -2003,6 +2021,17 @@ void Vehicle::_handleRCChannelsRaw(mavlink_message_t& message)
emit rcChannelsChanged(channelCount, pwmValues);
}
// Pop warnings ignoring for mavlink headers for both GCC/Clang and MSVC
#ifdef __GNUC__
#if defined(__clang__)
#pragma clang diagnostic pop
#else
#pragma GCC diagnostic pop
#endif
#else
#pragma warning(pop, 0)
#endif
void Vehicle::_handleScaledPressure(mavlink_message_t& message) {
mavlink_scaled_pressure_t pressure;
mavlink_msg_scaled_pressure_decode(&message, &pressure);
......
......@@ -9,24 +9,6 @@
#pragma once
// 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"
#elif defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Waddress-of-packed-member"
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#endif
#else
#pragma warning(push, 0)
#endif
#include <QElapsedTimer>
#include <QObject>
#include <QVariantList>
......
......@@ -13,24 +13,6 @@
#pragma once
// 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"
#elif defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Waddress-of-packed-member"
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#endif
#else
#pragma warning(push, 0)
#endif
#include "UASInterface.h"
#include <MAVLinkProtocol.h>
#include <QVector3D>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment