Skip to content

Commit

Permalink
mavlink: Supress gcc warnings when using mavlink includes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arne-W committed May 28, 2022
1 parent 91737c7 commit 9292724
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions libs/mavlink/include/mavlink/v2.0/ardupilotmega/mavlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,19 @@
#define MAVLINK_COMMAND_24BIT 1
#endif

// gcc version 9 brings a lot of new warnings. We supress them here for the mavlink
// library as it is not "our" code
#if defined(__GNUC__) && (__GNUC__ > 8)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Waddress-of-packed-member" // Suppress lots of warnings
#endif

#include "version.h"
#include "ardupilotmega.h"

#if defined(__GNUC__) && (__GNUC__ > 8)
#pragma GCC diagnostic pop
#endif


#endif // MAVLINK_H

0 comments on commit 9292724

Please sign in to comment.