Commit 5c9e9a52 authored by Patrick José Pereira's avatar Patrick José Pereira

QGCMAVLink: Add compiler check to avoid pragma warnings

MSVC warns about not identified pragmas
Signed-off-by: 's avatarPatrick José Pereira <patrickelectric@gmail.com>
parent bd4bfe55
......@@ -21,16 +21,22 @@
#include <stddef.h> // Hack workaround for Mav 2.0 header problem with respect to offsetof usage
// Ignore warnings from mavlink headers for both GCC/Clang and MSVC
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
#else
#pragma warning(push, 0)
#endif
#include <mavlink_types.h>
extern mavlink_status_t m_mavlink_status[MAVLINK_COMM_NUM_BUFFERS];
#include <mavlink.h>
#ifdef __GNUC__
#pragma GCC diagnostic pop
#else
#pragma warning(pop, 0)
#endif
class QGCMAVLink {
public:
......
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