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/+/1911?usp=email
to review the following change.
Change subject: cppcheck: Update suppressions for current master
......................................................................
cppcheck: Update suppressions for current master
Trying to get to a state where it actually passes when
merged.
Change-Id: I65f8826f343822c75e789d91881c9dbac676880f
Signed-off-by: Frank Lichtenheld <[email protected]>
---
M dev-tools/cppcheck-suppression
M dev-tools/run-cppcheck.sh
M src/openvpn/ssl.c
3 files changed, 6 insertions(+), 14 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/11/1911/1
diff --git a/dev-tools/cppcheck-suppression b/dev-tools/cppcheck-suppression
index f4f88a3..e1ffe37 100644
--- a/dev-tools/cppcheck-suppression
+++ b/dev-tools/cppcheck-suppression
@@ -26,17 +26,14 @@
getpwnamCalled
getservbynameCalled
localtimeCalled
-strtokCalled
# FP: posix.cfg claims suseconds_t is unsigned for some reason
unsignedLessThanZero:src/openvpn/otime.h:148
# IGN: multi code does weird things with pointers to local variables...
-autoVariables:src/openvpn/multi.c:4232
+autoVariables:src/openvpn/multi.c:4242
autoVariables:src/openvpn/multi_io.c:324
# IGN: the code header = 0 | (OPCODE << P_OPCODE_SHIFT) is used intentionally
badBitmaskCheck:src/openvpn/mudp.c
badBitmaskCheck:tests/unit_tests/openvpn/test_pkt.c
-# IGN: we store integers in pointers
-CastAddressToIntegerAtReturn:src/openvpn/multi.c
# IGN: Windows specific (unsigned long == unsigned int)
compareValueOutOfTypeRangeError:src/openvpn/ssl_verify.c:928
# FP: cppcheck seems to have wrong signature of DeviceIoControl()
@@ -78,8 +75,6 @@
nullPointerRedundantCheck:src/openvpn/init.c:301
# FP: cppcheck doesn't understand ZeroMemory
redundantAssignment:src/openvpnserv/interactive.c:203
-# FP: cppcheck doesn't know the NLA macros
-redundantInitialization:src/openvpn/dco_linux.c
# IGN: We reuse the same variable name due to macro usage
shadowVariable:src/openvpn/options.c:1948
shadowVariable:src/openvpn/options.c:1966
@@ -93,12 +88,10 @@
uninitvar:src/openvpn/options_parse.c:148
# FP: uninit is fine when it is a return parameter
ctuuninitvar:src/openvpn/crypto_mbedtls_legacy.c:690
-uninitvar:src/openvpnserv/interactive.c:2775
+uninitvar:src/openvpnserv/interactive.c:2783
uninitvar:src/tapctl/main.c:566
-# FP: we added a check but cppcheck is not convinced
-uninitvar:src/openvpnserv/interactive.c:2667
# FP: weird parse error, the macro is fine in the rest of the file
-unknownMacro:src/openvpnserv/interactive.c:3596
+unknownMacro:src/openvpnserv/interactive.c:3604
# FP: cppcheck doesn't account for short-circuiting
unreadVariable:src/openvpn/manage.c:682
unusedFunction:src/openvpn/siphash_reference.c
@@ -112,8 +105,6 @@
unusedFunction:tests/unit_tests/openvpnserv/test_openvpnserv.c
# IGN: keep mocking around for future use
unusedFunction:tests/unit_tests/openvpn/mock_msg.c
-# FP: doesn't account for --wrap
-unusedFunction:tests/unit_tests/openvpn/test_tls_crypt.c
unusedFunction:/usr/include/*
# FP: cppcheck doesn't know the NLA macros
unusedLabel:src/openvpn/dco_linux.c
diff --git a/dev-tools/run-cppcheck.sh b/dev-tools/run-cppcheck.sh
index fc14405..37de267 100755
--- a/dev-tools/run-cppcheck.sh
+++ b/dev-tools/run-cppcheck.sh
@@ -33,7 +33,7 @@
--suppressions-list=${SCRIPT_DIR}/cppcheck-suppression \
--cppcheck-build-dir=${CPPCHECK_DIR} \
--check-level=${CPPCHECK_CHECK_LEVEL} --max-configs=10 \
- --error-exitcode=1"
+ --error-exitcode=1 --showtime=summary"
set -x
@@ -53,5 +53,6 @@
-UTARGET_LINUX -UTARGET_FREEBSD -UTARGET_OPENBSD -UTARGET_NETBSD \
-UTARGET_DARWIN -UTARGET_ANDROID -UTARGET_SOLARIS -UTARGET_DRAGONFLY \
-UTARGET_AIX \
+ -UOPENSSL_NO_EC \
src/openvpn* src/compat/ \
tests/unit_tests/example_test/ tests/unit_tests/openvpn*
diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c
index 71459ee..48508e5 100644
--- a/src/openvpn/ssl.c
+++ b/src/openvpn/ssl.c
@@ -3226,7 +3226,7 @@
return;
}
- uint8_t *dataptr = to_link->data;
+ const uint8_t *dataptr = to_link->data;
/* we don't expect send_reliable to be NULL when state is
* not S_UNDEF, but people have reported crashes nonetheless,
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1911?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: I65f8826f343822c75e789d91881c9dbac676880f
Gerrit-Change-Number: 1911
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