iceoryx
iceoryx copied to clipboard
iox-#2011 Silence some warnings when building with GCC 13.
GCC 13 (which is in Ubuntu 24.04) introduced a number of false positive warnings when using -Warray-bounds and -Wstring-op; see:
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114758
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111118
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110807
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110498
In my testing, these only show up when building with optimizations, i.e. CMAKE_BUILD_TYPE=RelWithDebInfo.
This commit silences those warnings across the two functions that cause the problem, and make the build completely clean.
Notes for Reviewer
This should fix the yellow builds in e.g. https://ci.ros2.org/view/packaging/job/packaging_linux/3451/
Note that this targets the release_2.0
branch, since that is what ROS 2 is currently using. If you'd like me to target another branch and then backport, I'm happy to do that instead.
Pre-Review Checklist for the PR Author
- [x] Code follows the coding style of CONTRIBUTING.md
- [N/A] Tests follow the best practice for testing
- [x] Changelog updated in the unreleased section including API breaking changes
- [N/A] Branch follows the naming format (
iox-123-this-is-a-branch
) - [x] Commits messages are according to this guideline
- [x] Commit messages have the issue ID (
iox-#123 commit text
) - [x] Commit author matches Eclipse Contributor Agreement (and ECA is signed)
- [x] Commit messages have the issue ID (
- [x] Update the PR title
- Follow the same conventions as for commit messages
- Link to the relevant issue
- [N/A] Relevant issues are linked
- [x] Add sensible notes for the reviewer
- [ ] All checks have passed (except
task-list-completed
) - [ ] Assign PR to reviewer
Checklist for the PR Reviewer
- [ ] Consider a second reviewer for complex new features or larger refactorings
- [ ] Commits are properly organized and messages are according to the guideline
- [ ] Code according to our coding style and naming conventions
- [ ] Unit tests have been written for new behavior
- [ ] Public API changes are documented via doxygen
- [ ] Copyright owner are updated in the changed files
- [ ] All touched (C/C++) source code files from
iceoryx_hoofs
have been added to./clang-tidy-diff-scans.txt
- [ ] PR title describes the changes
Post-review Checklist for the PR Author
- [ ] All open points are addressed and tracked via issues
References
- Closes TBD