-
Notifications
You must be signed in to change notification settings - Fork 257
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
increase warning level on C/C++ compiler #1689
increase warning level on C/C++ compiler #1689
Conversation
7767d56
to
d3f4e9c
Compare
481c0ba
to
78bf5df
Compare
5def8a2
to
b2e994b
Compare
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.
I like the new warnings, but in general i feel like we should not rename local variables of functions but instead make it clearer that a global variable is global by renaming the global variable.
Please take another look. I have addressed most of your requested changes and left comments on the others. |
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 for the changes. I added some comments as well as adding some comments to the previous (open) conversations as well.
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 for the work! Looks good to me!
248003e
to
290eca5
Compare
290eca5
to
a5b9c64
Compare
and refactor all code that triggers that warning.
As there is no way to set g_verbose to anything but 0 or 1 in dbcheck, this code is unrechable and can be removed safely.
this function can simplify the current use of FindArgWithValue(). It does the same thing, but instead of returning the index, it returns a pointer to the value, or nullptr if the argument was not found or did not have a value.
5579484
to
ab10dbd
Compare
This PR adds new warnings and refactors code where needed
-Wshadow
and refactor problematic code-Wnon-virtual-dtor
Please check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
Make sure you check/merge the PR using
devtools/pr-tool
to have some simple automated checks run and a proper changelog record added.General
Check backport lineRequired backport PRs have been createdSource code quality