[PR #6877] [MERGED] build: cppcheck: use --check-level=exhaustive #6214

Closed
opened 2026-05-05 10:52:51 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/6877
Author: @kmk3
Created: 8/20/2025
Status: Merged
Merged: 8/21/2025
Merged by: @kmk3

Base: masterHead: cppcheck-use-check-level


📝 Commits (1)

  • c681b4b build: cppcheck: use --check-level=exhaustive

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 Makefile (+1 -1)

📄 Description

The --check-level=exhaustive option was briefly added, then changed to
--max-ctu-depth=40, presumably because the version being used in CI
(cppcheck 2.7 on ubuntu-22.04) did not support the former.

The current version in CI (cppcheck 2.13 on ubuntu-24.04) supports that
option, so restore it.

This fixes a flood of information: messages (which appear even with
-q) in the latest version of cppcheck:

$ cppcheck --version
Cppcheck 2.18.0
$ make cppcheck
cppcheck -q -j 4 --force --error-exitcode=1 --enable=warning,performance \
  --max-ctu-depth=40 \
  -i src/firejail/checkcfg.c \
  -i src/firejail/main.c \
  -i src/lib/syscall.c \
  .
cppcheck: --max-ctu-depth is being capped at 10. This limitation will be removed in a future Cppcheck version.
src/etc-cleanup/main.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

^
src/fbuilder/build_bin.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

^
src/fbuilder/build_fs.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

^
[...]

This is a follow-up to #6874.

Related commits:

  • be3c2a071 ("some problems reported by ccpcheck", 2025-08-17)
  • d4881b6bc ("cppcheck cleanup", 2025-08-17)
  • ebb368780 ("ci: cppcheck: upgrade ubuntu-22.04 to ubuntu-24.04",
    2025-08-20) / PR #6874

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/6877 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 8/20/2025 **Status:** ✅ Merged **Merged:** 8/21/2025 **Merged by:** [@kmk3](https://github.com/kmk3) **Base:** `master` ← **Head:** `cppcheck-use-check-level` --- ### 📝 Commits (1) - [`c681b4b`](https://github.com/netblue30/firejail/commit/c681b4b8914cd3244c0873bf06797fbd5cc760e1) build: cppcheck: use --check-level=exhaustive ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `Makefile` (+1 -1) </details> ### 📄 Description The `--check-level=exhaustive` option was briefly added, then changed to `--max-ctu-depth=40`, presumably because the version being used in CI (cppcheck 2.7 on ubuntu-22.04) did not support the former. The current version in CI (cppcheck 2.13 on ubuntu-24.04) supports that option, so restore it. This fixes a flood of `information:` messages (which appear even with `-q`) in the latest version of cppcheck: $ cppcheck --version Cppcheck 2.18.0 $ make cppcheck cppcheck -q -j 4 --force --error-exitcode=1 --enable=warning,performance \ --max-ctu-depth=40 \ -i src/firejail/checkcfg.c \ -i src/firejail/main.c \ -i src/lib/syscall.c \ . cppcheck: --max-ctu-depth is being capped at 10. This limitation will be removed in a future Cppcheck version. src/etc-cleanup/main.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] ^ src/fbuilder/build_bin.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] ^ src/fbuilder/build_fs.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches] ^ [...] This is a follow-up to #6874. Related commits: * be3c2a071 ("some problems reported by ccpcheck", 2025-08-17) * d4881b6bc ("cppcheck cleanup", 2025-08-17) * ebb368780 ("ci: cppcheck: upgrade ubuntu-22.04 to ubuntu-24.04", 2025-08-20) / PR #6874 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:52:51 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#6214
No description provided.