[Openvpn-devel,v1] cppcheck: Update suppressions for current master
Commit Message
From: Frank Lichtenheld <frank@lichtenheld.com>
Trying to get to a state where it actually passes when
merged.
Change-Id: I65f8826f343822c75e789d91881c9dbac676880f
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Razvan Cojocaru <razvanc@mailbox.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1911
---
This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1911
This mail reflects revision 1 of this Change.
Acked-by according to Gerrit (reflected above):
Razvan Cojocaru <razvanc@mailbox.org>
Comments
Test-Tooling, no direct code impact (so nothing for me to test).
One actual code change sneaked in here (bring in a "const") - it
might actually be bringing *back* that const (the diff line looks
familiar from one of the last CVE patches which had some conflicts
with a patch that introduced consts there). But the change is
trivial & correct.
Your patch has been applied to the master branch.
commit e542754a8fc979e025e6d70186102b1934c1162d
Author: Frank Lichtenheld
Date: Sat Sep 12 12:23:42 2026 +0200
cppcheck: Update suppressions for current master
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Razvan Cojocaru <razvanc@mailbox.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1911
Message-Id: <20260912102348.423-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg39128.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
@@ -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
@@ -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*
@@ -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,