Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1966?usp=email
to review the following change.
Change subject: cppcheck: Review suppressions for constParameter and
constParameterCallback
......................................................................
cppcheck: Review suppressions for constParameter and constParameterCallback
I reviewed all the occurrences of the two cppcheck
errors constParameter and constParameterCallback.
All of constParameterCallback occurences were bogus and
I think in most cases they will be. So continue to ignore
it completely but document that we considered it and it
is not useful.
All existing cases of constParameter were bogus, but
there might be useful hits in the future so I only
suppress the existing occurrences.
Change-Id: I76c310f9e69276d4f21a4ad31a24490553d6d5c4
Signed-off-by: Frank Lichtenheld <[email protected]>
---
M dev-tools/cppcheck-suppressions.xml
1 file changed, 20 insertions(+), 11 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/66/1966/1
diff --git a/dev-tools/cppcheck-suppressions.xml
b/dev-tools/cppcheck-suppressions.xml
index bd24c3b..33337cf 100644
--- a/dev-tools/cppcheck-suppressions.xml
+++ b/dev-tools/cppcheck-suppressions.xml
@@ -3,23 +3,20 @@
<!-- We start with enable=all, but then suppress some issues that have too
many
occurences right now. They still should be fixed at some point -->
<suppress>
- <id>constParameter</id>
- </suppress>
- <suppress>
- <id>constParameterCallback</id>
- </suppress>
- <suppress>
<id>unusedFunction</id>
</suppress>
<suppress>
<id>usleepCalled</id>
</suppress>
- <!-- We have a lot of library includes, not all of them are really required,
+ <!-- These are specific false-positives (FP) or ignored (IGN) issues
+ We might want to move some of them to inline-suppression to avoid
+ the static line-numbers -->
+ <!-- IGN: We have a lot of library includes, not all of them are really
required,
so ignore them -->
<suppress>
<id>missingIncludeSystem</id>
</suppress>
- <!-- cppcheck doesn't understand about check_malloc_return, so these are
+ <!-- FP: cppcheck doesn't understand about check_malloc_return, so these are
usually misleading -->
<suppress>
<id>nullPointerOutOfMemory</id>
@@ -27,9 +24,6 @@
<suppress>
<id>nullPointerArithmeticOutOfMemory</id>
</suppress>
- <!-- These are specific false-positives (FP) or ignored (IGN) issues
- We might want to move some of them to inline-suppression to avoid
- the static line-numbers -->
<!-- IGN: posix.cfg: We are not threadsafe -->
<suppress>
<id>getgrnamCalled</id>
@@ -62,6 +56,11 @@
<id>badBitmaskCheck</id>
<fileName>tests/unit_tests/openvpn/test_pkt.c</fileName>
</suppress>
+ <!-- FP: All occurrences are either external types or types that
+ explicitly need to be non-const in some variants of the callback -->
+ <suppress>
+ <id>constParameterCallback</id>
+ </suppress>
<!-- IGN: we use casts to remove const -->
<suppress>
<id>constParameterPointer</id>
@@ -74,6 +73,12 @@
<fileName>src/openvpn/buffer.c</fileName>
<symbolName>buf</symbolName>
</suppress>
+ <!-- FP: can't change the signature of wmain -->
+ <suppress>
+ <id>constParameter</id>
+ <fileName>src/openvpn/openvpn.c</fileName>
+ <symbolName>wargv</symbolName>
+ </suppress>
<!-- IGN: external -->
<suppress>
<id>constParameterPointer</id>
@@ -81,6 +86,10 @@
</suppress>
<!-- IGN: too many false-positives due to stubs -->
<suppress>
+ <id>constParameter</id>
+ <fileName>tests/unit_tests/openvpn*/test_*</fileName>
+ </suppress>
+ <suppress>
<id>constParameterPointer</id>
<fileName>tests/unit_tests/openvpn*/test_*</fileName>
</suppress>
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1966?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76c310f9e69276d4f21a4ad31a24490553d6d5c4
Gerrit-Change-Number: 1966
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel