-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update mavlink version #1266
Update mavlink version #1266
Conversation
// 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 | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please migrate this change into the new version?? Without it the build generates thousands of warnings with newer gcc compilers. Moreover it would be very cool if you could add
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#pragma GCC diagnostic ignored "-Wuninitialized"
to the first block to silence all warnings emitted by mavlink.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peterbarker this should be part of the mavlink generation step in AP - any idea how we can fix that up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Arne-W we think that this problem was largely resolved in mavlink at the end of last year, did you actually try the update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andyp1per Yes I built the change and got round about 3000 warnings. But to be absolutely sure I will check it again and inform you about the compiler and the options we are using.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks - I will double check the versions of the generator I used just to make sure I didn't miss a version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I built from scratch on a new Kubuntu 22.04 with gcc 11.3.0 and I get more than 4000 warnings (counting all the duplicates).
mavlink_msg_obstacle_distance.h:173:158: warning: taking address of packed member of ‘__mavlink_obstacle_distance_t’ may result in an unaligned pointer value [-Waddress-of-packed-member]
We are building with -Wall -Wextra. Adding the diagnostic ignore pragma removes all warnings generated by mavlink.
Nice - Thank you very much. 👍 |
No description provided.