diff --git a/src/comm/QGCMAVLink.h b/src/comm/QGCMAVLink.h index e5810a75a7e6bed99e5f932ff0045cc02e486882..202fee0eb636e2bec9274eb2b8079310b6becd08 100644 --- a/src/comm/QGCMAVLink.h +++ b/src/comm/QGCMAVLink.h @@ -21,16 +21,22 @@ #include // 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 extern mavlink_status_t m_mavlink_status[MAVLINK_COMM_NUM_BUFFERS]; #include +#ifdef __GNUC__ #pragma GCC diagnostic pop +#else #pragma warning(pop, 0) +#endif class QGCMAVLink { public: