-
Notifications
You must be signed in to change notification settings - Fork 905
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
cleanup: fix several warnings from a Clang build #2948
cleanup: fix several warnings from a Clang build #2948
Conversation
Signed-off-by: Federico Aponte <federico.aponte@sysdig.com>
This PR may bring feature or behavior changes in the Falco engine and may require the engine version to be bumped. Please double check userspace/engine/falco_engine_version.h file. See versioning for FALCO_ENGINE_VERSION. /hold |
The fix is only a cleanup of warnings that introduces no interface or functionality change. /unhold |
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.
Thanks! 🤩
LGTM label has been added. Git tree hash: dc570829f3e00c0e4de1159179b498d7bb10e1b2
|
@LucaGuerra: The provided milestone is not valid for this repository. Milestones in this repository: [ Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/milestone 0.37.0 |
|
||
return errstr.c_str(); | ||
// const + noexcept: can't use functions that change the object or throw | ||
return msg.c_str(); |
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.
This changes rule load exception errors, right?
cc @jasondellaluce i am not sure we want it.
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.
@FedeDP I knew it was a deeper change and I was reluctant to do it, but in the end I decided to go ahead because
- the function has the same name of a virtual function and should have the same signature (i.e. with const + noexcept), this is why a warning was raised by the compiler
- being noexcept forbids invoking functions that might throw, such as string concatenation
- I could not find any place in the code where the function is invoked.
If the new implementation is problematic as it changes the original message, let's talk about it.
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: federico-sysdig, incertum, LucaGuerra The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
What this PR does / why we need it:
A Clang build revealed a number of warnings whose fix should increase the quality of the code.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: