iox-#2011 Solve a warning when building in Release mode. #2298
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.
When building the
iceoryx_hoofs
package from therelease_2.0
branch in Release mode (-DCMAKE_BUILD_TYPE=Release
), with gcc 13, we get warnings like the following:This change avoids the warning by just always assigning a zero. However, this isn't really a serious attempt at a fix, but more of a way to start a discussion. I noticed that the
main
branch compiles without warnings, but does not have this zero in place. That said, I do not understand the mechanism that is being used there, so I'm having trouble tracking down the difference between themain
branch and this one. Any thoughts on the "correct" way to fix this?(skipping the rest of the checklist for now until we decide what to do here)
Notes for Reviewer
Pre-Review Checklist for the PR Author
iox-123-this-is-a-branch
)iox-#123 commit text
)task-list-completed
)Checklist for the PR Reviewer
iceoryx_hoofs
have been added to./clang-tidy-diff-scans.txt
Post-review Checklist for the PR Author
References