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
CI updates #1947
Merged
Merged
CI updates #1947
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Windows 2022 - GCC 13 - macOS 13 Signed-off-by: Erik Boasson <eb@ilities.com>
Leaving out a lot of details in the actual code, this: serdata_x_from_ser (... const struct ddsi_rdata *fragchain ...) { (1) assert (fragchain->min == 0); (2) while (fragchain) fragchain = fragchain->nextfrag; triggered a warning from the gcc 13.1 static analyzer that fragchain was tested for a null pointer at (2) after having dereferenced it already at (1). Clearly this is because the function is not annotated as required a non-null fragchain on input. This commit adds these non-null annotation (and some "warn unused result" ones) on the ddsi_serdata_... functions. The cases where this resulted in new warnings have also been updated. Signed-off-by: Erik Boasson <eb@ilities.com>
* We don't care about malloc failures in "dynsub", asserting the result is not a null pointer pacifies the analyzer * The roundtrip example had an "interesting" way of updating the statistics object that caused a false-positive leak warning from the analyzer. The warning disappears by simply eliminating the interesting bit * Some false positives on leaking file descriptors in TCP support code * Ouput buffer size in snprintf that was flagged as potentially too small (which it is true if the integer being printed can have any valid value, but it can't) * Some warnings related to possible malloc failures in ucunit Signed-off-by: Erik Boasson <eb@ilities.com>
This despite the variable getting reassigned by a potentially null pointer. Using a separete variable solves the problem and is arguably better style. Signed-off-by: Erik Boasson <eb@ilities.com>
There are false positive warnings for - stringop-overflow - array-bounds that don't seem to be suppressible using Pragmas. From what I can tell, they occur on gcc 13.1 but not gcc 13.2. Sadly, gcc 13.1 is the latest version of gcc that is available on Ubuntu 22.04, so this would imply being stuck on a really old gcc version in the CI where we use -Werror. This commit prevents these two warnings from being treated as errors, but only if it is gcc 13.0 or gcc 13.1. That way the risk of not treating them as errors should be minimized. Signed-off-by: Erik Boasson <eb@ilities.com>
dpotman
approved these changes
Mar 27, 2024
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.
Looks good!
clalancette
added a commit
to clalancette/cyclonedds
that referenced
this pull request
Apr 2, 2024
This is a partial backport of eclipse-cyclonedds#1947 Signed-off-by: Chris Lalancette <clalancette@gmail.com>
eboasson
pushed a commit
that referenced
this pull request
Apr 2, 2024
This is a partial backport of #1947 Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This bumps the CI platforms. That in turn causes some trouble with (in particular) gcc and macOS.