Change in openvpn[master]: dev-tools: Add script to run cppcheck against the code-base
A message that is not in the archive (sent off-list or not yet received): gerrit.1775421558000.I125cf63f11257d7245ead2f7feafb86b841580a5@...2715...
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/+/1620?usp=email
to review the following change.
Change subject: dev-tools: Add script to run cppcheck against the code-base
......................................................................
dev-tools: Add script to run cppcheck against the code-base
Also add a suitable suppressions-list file to
make it possible to run it without reporting
errors.
Tested with cppcheck 2.19.0 (Ubuntu 26.04).
---
M Makefile.am
A dev-tools/cppcheck-suppression
A dev-tools/run-cppcheck.sh
3 files changed, 117 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/20/1620/1
Makefile.am +7 -0
@@ -89,3 +89,10 @@ doxygen: $(MAKE) -C doc/doxygen doxygen + +.PHONY: cppcheck +cppcheck: + BUILD_DIR="$(abs_top_builddir)" \ + SOURCE_DIR="$(abs_top_srcdir)" \ + INCLUDE_FLAGS="$(LIBNL_GENL_CFLAGS)" \ + "$(top_srcdir)/dev-tools/run-cppcheck.sh"
dev-tools/cppcheck-suppression new file +85 -0
85 lines not on this page · raw message
dev-tools/run-cppcheck.sh new file +25 -0
@@ -0,0 +1,25 @@ +#!/bin/bash + +set -eu + +SCRIPT_DIR=$(dirname $(readlink -e "${BASH_SOURCE[0]}")) +: ${SOURCE_DIR:=$SCRIPT_DIR/..} +: ${BUILD_DIR:=$PWD} +: ${INCLUDE_FLAGS:=} +CPPCHECK_DIR="${BUILD_DIR}/cppcheck_build_dir" + +set -x + +mkdir -p "$CPPCHECK_DIR" +cd "${SOURCE_DIR}" +cppcheck -j$(nproc) \ + -DHAVE_CONFIG_H -U_WIN32 \ + -I./include/ -I./tests/unit_tests/openvpn/ \ + -I./src/compat/ -I./src/openvpn/ -I./src/openvpnserv/ -I./src/plugins/auth-pam/ \ + -I"${BUILD_DIR}" -I"${BUILD_DIR}/include/" $INCLUDE_FLAGS \ + --enable=all \ + --suppressions-list="${SCRIPT_DIR}/cppcheck-suppression" \ + --cppcheck-build-dir="${CPPCHECK_DIR}" \ + --check-level=exhaustive \ + --error-exitcode=1 \ + src/ tests/
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1620?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: I125cf63f11257d7245ead2f7feafb86b841580a5
Gerrit-Change-Number: 1620
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/1620?usp=email
to look at the new patch set (#4).
Change subject: dev-tools: Add script to run cppcheck against the code-base
......................................................................
dev-tools: Add script to run cppcheck against the code-base
Also add a suitable suppressions-list file to
make it possible to run it without reporting
errors.
Tested with cppcheck 2.19.0 (Ubuntu 26.04).
---
M Makefile.am
A dev-tools/cppcheck-suppression
A dev-tools/run-cppcheck.sh
3 files changed, 120 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/20/1620/4
Makefile.am +7 -0
@@ -89,3 +89,10 @@ doxygen: $(MAKE) -C doc/doxygen doxygen + +.PHONY: cppcheck +cppcheck: + BUILD_DIR="$(abs_top_builddir)" \ + SOURCE_DIR="$(abs_top_srcdir)" \ + INCLUDE_FLAGS="$(LIBNL_GENL_CFLAGS)" \ + "$(top_srcdir)/dev-tools/run-cppcheck.sh"
dev-tools/cppcheck-suppression new file +87 -0
87 lines not on this page · raw message
dev-tools/run-cppcheck.sh new file +26 -0
@@ -0,0 +1,26 @@ +#!/bin/bash + +set -eu + +SCRIPT_DIR=$(dirname $(readlink -e "${BASH_SOURCE[0]}")) +: ${SOURCE_DIR:=$SCRIPT_DIR/..} +: ${BUILD_DIR:=$PWD} +: ${INCLUDE_FLAGS:=} +CPPCHECK_DIR="${BUILD_DIR}/cppcheck_build_dir" + +set -x + +mkdir -p "$CPPCHECK_DIR" +cd "${SOURCE_DIR}" +cppcheck -j$(nproc) \ + -DHAVE_CONFIG_H -U_WIN32 \ + -DMBEDTLS_SSL_PROTO_TLS1_3 -DMBEDTLS_SSL_KEYING_MATERIAL_EXPORT \ + -I./include/ -I./tests/unit_tests/openvpn/ \ + -I./src/compat/ -I./src/openvpn/ -I./src/openvpnserv/ -I./src/plugins/auth-pam/ \ + -I"${BUILD_DIR}" -I"${BUILD_DIR}/include/" $INCLUDE_FLAGS \ + --enable=all \ + --suppressions-list="${SCRIPT_DIR}/cppcheck-suppression" \ + --cppcheck-build-dir="${CPPCHECK_DIR}" \ + --check-level=exhaustive \ + --error-exitcode=1 \ + src/ tests/ sample/
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1620?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I125cf63f11257d7245ead2f7feafb86b841580a5
Gerrit-Change-Number: 1620
Gerrit-PatchSet: 4
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/1620?usp=email
to look at the new patch set (#5).
Change subject: dev-tools: Add script to run cppcheck against the code-base
......................................................................
dev-tools: Add script to run cppcheck against the code-base
Also add a suitable suppressions-list file to
make it possible to run it without reporting
errors.
Tested with cppcheck 2.19.0 (Ubuntu 26.04).
---
M Makefile.am
A dev-tools/cppcheck-suppression
A dev-tools/run-cppcheck.sh
3 files changed, 120 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/20/1620/5
Makefile.am +7 -0
@@ -89,3 +89,10 @@ doxygen: $(MAKE) -C doc/doxygen doxygen + +.PHONY: cppcheck +cppcheck: + BUILD_DIR="$(abs_top_builddir)" \ + SOURCE_DIR="$(abs_top_srcdir)" \ + INCLUDE_FLAGS="$(LIBNL_GENL_CFLAGS)" \ + "$(top_srcdir)/dev-tools/run-cppcheck.sh"
dev-tools/cppcheck-suppression new file +87 -0
87 lines not on this page · raw message
dev-tools/run-cppcheck.sh new file +26 -0
@@ -0,0 +1,26 @@ +#!/bin/bash + +set -eu + +SCRIPT_DIR=$(dirname $(readlink -e "${BASH_SOURCE[0]}")) +: ${SOURCE_DIR:=$SCRIPT_DIR/..} +: ${BUILD_DIR:=$PWD} +: ${INCLUDE_FLAGS:=} +CPPCHECK_DIR="${BUILD_DIR}/cppcheck_build_dir" + +set -x + +mkdir -p "$CPPCHECK_DIR" +cd "${SOURCE_DIR}" +cppcheck -j$(nproc) \ + -DHAVE_CONFIG_H -U_WIN32 \ + -DMBEDTLS_SSL_PROTO_TLS1_3 -DMBEDTLS_SSL_KEYING_MATERIAL_EXPORT \ + -I./include/ -I./tests/unit_tests/openvpn/ \ + -I./src/compat/ -I./src/openvpn/ -I./src/openvpnserv/ -I./src/plugins/auth-pam/ \ + -I"${BUILD_DIR}" -I"${BUILD_DIR}/include/" $INCLUDE_FLAGS \ + --enable=all \ + --suppressions-list="${SCRIPT_DIR}/cppcheck-suppression" \ + --cppcheck-build-dir="${CPPCHECK_DIR}" \ + --check-level=exhaustive \ + --error-exitcode=1 \ + src/ tests/ sample/
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1620?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I125cf63f11257d7245ead2f7feafb86b841580a5
Gerrit-Change-Number: 1620
Gerrit-PatchSet: 5
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1620?usp=email )
Change subject: dev-tools: Add script to run cppcheck against the code-base
......................................................................
Patch Set 5: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1620?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I125cf63f11257d7245ead2f7feafb86b841580a5
Gerrit-Change-Number: 1620
Gerrit-PatchSet: 5
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Sun, 19 Apr 2026 13:41:48 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
PATCH v5 1/1 dev-tools: Add script to run cppcheck against the code-base
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]...>
Also add a suitable suppressions-list file to
make it possible to run it without reporting
errors.
Tested with cppcheck 2.19.0 (Ubuntu 26.04).
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1620
---
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/+/1620
This mail reflects revision 5 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
Makefile.am +7 -0
@@ -89,3 +89,10 @@ doxygen: $(MAKE) -C doc/doxygen doxygen + +.PHONY: cppcheck +cppcheck: + BUILD_DIR="$(abs_top_builddir)" \ + SOURCE_DIR="$(abs_top_srcdir)" \ + INCLUDE_FLAGS="$(LIBNL_GENL_CFLAGS)" \ + "$(top_srcdir)/dev-tools/run-cppcheck.sh"
dev-tools/cppcheck-suppression new file +87 -0
87 lines not on this page · raw message
dev-tools/run-cppcheck.sh new file +26 -0
@@ -0,0 +1,26 @@ +#!/bin/bash + +set -eu + +SCRIPT_DIR=$(dirname $(readlink -e "${BASH_SOURCE[0]}")) +: ${SOURCE_DIR:=$SCRIPT_DIR/..} +: ${BUILD_DIR:=$PWD} +: ${INCLUDE_FLAGS:=} +CPPCHECK_DIR="${BUILD_DIR}/cppcheck_build_dir" + +set -x + +mkdir -p "$CPPCHECK_DIR" +cd "${SOURCE_DIR}" +cppcheck -j$(nproc) \ + -DHAVE_CONFIG_H -U_WIN32 \ + -DMBEDTLS_SSL_PROTO_TLS1_3 -DMBEDTLS_SSL_KEYING_MATERIAL_EXPORT \ + -I./include/ -I./tests/unit_tests/openvpn/ \ + -I./src/compat/ -I./src/openvpn/ -I./src/openvpnserv/ -I./src/plugins/auth-pam/ \ + -I"${BUILD_DIR}" -I"${BUILD_DIR}/include/" $INCLUDE_FLAGS \ + --enable=all \ + --suppressions-list="${SCRIPT_DIR}/cppcheck-suppression" \ + --cppcheck-build-dir="${CPPCHECK_DIR}" \ + --check-level=exhaustive \ + --error-exitcode=1 \ + src/ tests/ sample/
[Openvpn-devel] [PATCH applied] Re: dev-tools: Add script to run cppcheck against the code-base
While we do not have all cppcheck-found edges and corners properly sanded, it makes sense to have the infrastructure and the exclude lists around already.
No code changes to "the project", just new devtool + new "make" target.
Your patch has been applied to the master branch.
commit 0b7c29535049baec9fe89821cd2a65437094c9b1
Author: Frank Lichtenheld Date: Sun Apr 19 15:41:57 2026 +0200
dev-tools: Add script to run cppcheck against the code-base
Signed-off-by: Frank Lichtenheld <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1620
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg36664.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#6) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1620?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: dev-tools: Add script to run cppcheck against the code-base
......................................................................
dev-tools: Add script to run cppcheck against the code-base
Also add a suitable suppressions-list file to
make it possible to run it without reporting
errors.
Tested with cppcheck 2.19.0 (Ubuntu 26.04).
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1620
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg36664.html
---
M Makefile.am
A dev-tools/cppcheck-suppression
A dev-tools/run-cppcheck.sh
3 files changed, 120 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/20/1620/6
Makefile.am +7 -0
@@ -89,3 +89,10 @@ doxygen: $(MAKE) -C doc/doxygen doxygen + +.PHONY: cppcheck +cppcheck: + BUILD_DIR="$(abs_top_builddir)" \ + SOURCE_DIR="$(abs_top_srcdir)" \ + INCLUDE_FLAGS="$(LIBNL_GENL_CFLAGS)" \ + "$(top_srcdir)/dev-tools/run-cppcheck.sh"
dev-tools/cppcheck-suppression new file +87 -0
87 lines not on this page · raw message
dev-tools/run-cppcheck.sh new file +26 -0
@@ -0,0 +1,26 @@ +#!/bin/bash + +set -eu + +SCRIPT_DIR=$(dirname $(readlink -e "${BASH_SOURCE[0]}")) +: ${SOURCE_DIR:=$SCRIPT_DIR/..} +: ${BUILD_DIR:=$PWD} +: ${INCLUDE_FLAGS:=} +CPPCHECK_DIR="${BUILD_DIR}/cppcheck_build_dir" + +set -x + +mkdir -p "$CPPCHECK_DIR" +cd "${SOURCE_DIR}" +cppcheck -j$(nproc) \ + -DHAVE_CONFIG_H -U_WIN32 \ + -DMBEDTLS_SSL_PROTO_TLS1_3 -DMBEDTLS_SSL_KEYING_MATERIAL_EXPORT \ + -I./include/ -I./tests/unit_tests/openvpn/ \ + -I./src/compat/ -I./src/openvpn/ -I./src/openvpnserv/ -I./src/plugins/auth-pam/ \ + -I"${BUILD_DIR}" -I"${BUILD_DIR}/include/" $INCLUDE_FLAGS \ + --enable=all \ + --suppressions-list="${SCRIPT_DIR}/cppcheck-suppression" \ + --cppcheck-build-dir="${CPPCHECK_DIR}" \ + --check-level=exhaustive \ + --error-exitcode=1 \ + src/ tests/ sample/
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1620?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I125cf63f11257d7245ead2f7feafb86b841580a5
Gerrit-Change-Number: 1620
Gerrit-PatchSet: 6
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1620?usp=email )
Change subject: dev-tools: Add script to run cppcheck against the code-base
......................................................................
dev-tools: Add script to run cppcheck against the code-base
Also add a suitable suppressions-list file to
make it possible to run it without reporting
errors.
Tested with cppcheck 2.19.0 (Ubuntu 26.04).
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1620
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg36664.html
---
M Makefile.am
A dev-tools/cppcheck-suppression
A dev-tools/run-cppcheck.sh
3 files changed, 120 insertions(+), 0 deletions(-)
Makefile.am +7 -0
@@ -89,3 +89,10 @@ doxygen: $(MAKE) -C doc/doxygen doxygen + +.PHONY: cppcheck +cppcheck: + BUILD_DIR="$(abs_top_builddir)" \ + SOURCE_DIR="$(abs_top_srcdir)" \ + INCLUDE_FLAGS="$(LIBNL_GENL_CFLAGS)" \ + "$(top_srcdir)/dev-tools/run-cppcheck.sh"
dev-tools/cppcheck-suppression new file +87 -0
87 lines not on this page · raw message
dev-tools/run-cppcheck.sh new file +26 -0
@@ -0,0 +1,26 @@ +#!/bin/bash + +set -eu + +SCRIPT_DIR=$(dirname $(readlink -e "${BASH_SOURCE[0]}")) +: ${SOURCE_DIR:=$SCRIPT_DIR/..} +: ${BUILD_DIR:=$PWD} +: ${INCLUDE_FLAGS:=} +CPPCHECK_DIR="${BUILD_DIR}/cppcheck_build_dir" + +set -x + +mkdir -p "$CPPCHECK_DIR" +cd "${SOURCE_DIR}" +cppcheck -j$(nproc) \ + -DHAVE_CONFIG_H -U_WIN32 \ + -DMBEDTLS_SSL_PROTO_TLS1_3 -DMBEDTLS_SSL_KEYING_MATERIAL_EXPORT \ + -I./include/ -I./tests/unit_tests/openvpn/ \ + -I./src/compat/ -I./src/openvpn/ -I./src/openvpnserv/ -I./src/plugins/auth-pam/ \ + -I"${BUILD_DIR}" -I"${BUILD_DIR}/include/" $INCLUDE_FLAGS \ + --enable=all \ + --suppressions-list="${SCRIPT_DIR}/cppcheck-suppression" \ + --cppcheck-build-dir="${CPPCHECK_DIR}" \ + --check-level=exhaustive \ + --error-exitcode=1 \ + src/ tests/ sample/
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1620?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I125cf63f11257d7245ead2f7feafb86b841580a5
Gerrit-Change-Number: 1620
Gerrit-PatchSet: 6
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>