mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 08:15:26 +03:00
address gcc9 warnings
This commit is contained in:
parent
3cdeacbd54
commit
8372958f46
2 changed files with 15 additions and 0 deletions
|
@ -1045,6 +1045,13 @@ static void writeInterframe(void)
|
|||
blackboxLoggedAnyFrames = true;
|
||||
}
|
||||
|
||||
// for gcc9 (and maybe later), we warn on (mainly harmless) unaligned packed structure member pointer access
|
||||
// minimise the effect to the affected functions and compiler versions.
|
||||
#if (__GNUC__ >= 9)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
|
||||
#endif
|
||||
|
||||
/* Write the contents of the global "slowHistory" to the log as an "S" frame. Because this data is logged so
|
||||
* infrequently, delta updates are not reasonable, so we log independent frames. */
|
||||
static void writeSlowFrame(void)
|
||||
|
@ -1131,6 +1138,10 @@ static void loadSlowState(blackboxSlowState_t *slow)
|
|||
|
||||
}
|
||||
|
||||
#if (__GNUC__ >= 9)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
/**
|
||||
* If the data in the slow frame has changed, log a slow frame.
|
||||
*
|
||||
|
|
|
@ -75,6 +75,10 @@
|
|||
// until this is resolved in mavlink library - ignore -Wpedantic for mavlink code
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||
// For gcc9, the mavlink libary also fails on unaligned unaligned packed structure member pointer access
|
||||
#if (__GNUC__ >= 9)
|
||||
#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
|
||||
#endif
|
||||
#include "common/mavlink.h"
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue