increase warning level on C/C++ compiler#1689
Merged
BareosBot merged 7 commits intobareos:masterfrom Mar 12, 2024
Merged
Conversation
7767d56 to
d3f4e9c
Compare
481c0ba to
78bf5df
Compare
5def8a2 to
b2e994b
Compare
sebsura
requested changes
Feb 16, 2024
Contributor
sebsura
left a comment
There was a problem hiding this comment.
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.
Member
Author
|
Please take another look. I have addressed most of your requested changes and left comments on the others. |
sebsura
requested changes
Mar 4, 2024
Contributor
sebsura
left a comment
There was a problem hiding this comment.
Thanks for the changes. I added some comments as well as adding some comments to the previous (open) conversations as well.
sebsura
approved these changes
Mar 8, 2024
Contributor
sebsura
left a comment
There was a problem hiding this comment.
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
11 tasks
pstorz
pushed a commit
to pstorz/bareos
that referenced
this pull request
Dec 21, 2024
Commit PR bareos#1689 (812f9e4) contains a change in core/src/lib/crypto.h, which has only been partially synced with core/src/lib/crypto_openssl.cc. The latter file contains two definitions of EvpDigest(), depending on OpenSSL major version. Only one was fixed. When compiling e.g. on CentOS 7 one gets an error about shadowing. (cherry picked from commit a85a409)
pstorz
pushed a commit
to pstorz/bareos
that referenced
this pull request
Dec 21, 2024
Commit PR bareos#1689 (812f9e4) contains a change in core/src/lib/crypto.h, which has only been partially synced with core/src/lib/crypto_openssl.cc. The latter file contains two definitions of EvpDigest(), depending on OpenSSL major version. Only one was fixed. When compiling e.g. on CentOS 7 one gets an error about shadowing. (cherry picked from commit a85a409)
florian-at-bareos
pushed a commit
to florian-at-bareos/bareos
that referenced
this pull request
Jan 27, 2025
Commit PR bareos#1689 (812f9e4) contains a change in core/src/lib/crypto.h, which has only been partially synced with core/src/lib/crypto_openssl.cc. The latter file contains two definitions of EvpDigest(), depending on OpenSSL major version. Only one was fixed. When compiling e.g. on CentOS 7 one gets an error about shadowing.
florian-at-bareos
pushed a commit
to florian-at-bareos/bareos
that referenced
this pull request
Jan 27, 2025
Commit PR bareos#1689 (812f9e4) contains a change in core/src/lib/crypto.h, which has only been partially synced with core/src/lib/crypto_openssl.cc. The latter file contains two definitions of EvpDigest(), depending on OpenSSL major version. Only one was fixed. When compiling e.g. on CentOS 7 one gets an error about shadowing.
pstorz
pushed a commit
to pstorz/bareos
that referenced
this pull request
Jan 30, 2025
Commit PR bareos#1689 (812f9e4) contains a change in core/src/lib/crypto.h, which has only been partially synced with core/src/lib/crypto_openssl.cc. The latter file contains two definitions of EvpDigest(), depending on OpenSSL major version. Only one was fixed. When compiling e.g. on CentOS 7 one gets an error about shadowing.
This file contains hidden or 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
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 PR adds new warnings and refactors code where needed
-Wshadowand refactor problematic code-Wnon-virtual-dtorPlease 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-toolto have some simple automated checks run and a proper changelog record added.General
Check backport lineRequired backport PRs have been createdSource code quality