-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore: fix cppcheck warning #3434
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
base: v3/master
Are you sure you want to change the base?
Conversation
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.
Can't say that I understand all the changes, but I didn't spot any obvious errors.
Below I attached the link of the failed action and a short description how to see them. I fixed all occurrences.
Here is the output of https://github.com/owasp-modsecurity/ModSecurity/actions/runs/16874871780/job/47804383442?pr=3432 Unfortunately it's hard to see where are the failed checks, probably you can download raw logs, extract them and find the pattern
Mostly those are type cast issues. There are a few new SonarCloud errors here, I'm going to fix them before I merge this PR. I'll let you know if I'm done. |
Here are the list of type cast issues:
plus the
|
|
Okay, I think I'm done. |
what
This PR collects a few small fixes which solves the issues with current (2.18.0)
cppcheck
.Changes:
iss
was declared asstd::istream
and later it was converted unnecessaryhttps://
then we should read from stream. Note thatstd::stringstream
(case ofhttp
resource) andstd::ifstream
derived both fromstd::istream
reinterpret_cast<>
and add error report (if the socket type is notAF_INET
(IPv4))reinterpret_cast<>
test/cppcheck_suppressions.txt
why
There are a few warnings by
cppcheck
in recent PR's.references
See PR #3432.