Unverified Commit 1200542b authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8355 from patrickelectric/msvc_pragma

QGCMAVLink: Add compiler check to avoid pragma warnings
parents d040b949 5c9e9a52
......@@ -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