Commit Graph

16 Commits

Author SHA1 Message Date
firewave 0410abef98 enabled cppcheck performance checks 2026-04-17 15:07:58 +02:00
firewave 64154ea66d enabled and fixed constVariable Cppcheck warnings 2026-03-04 15:49:29 +01:00
firewave 416aa53157 enabled cppcheck portability checks 2026-02-20 16:02:05 +01:00
firewave 2fb807391a enabled and fixed unassignedVariable Cppcheck warnings 2026-02-18 11:26:45 +01:00
firewave 077dbbcba9 enabled some cppcheck style checks 2026-02-17 19:01:19 +01:00
firewave 04901714f8 exclude vrplayer from Cppcheck for now because it requires Qt headers to be generated 2025-11-04 13:47:47 +01:00
firewave 01c60f9ba4 added missing include paths for Cppcheck 2025-11-04 13:41:26 +01:00
firewave e678de9360 enabled missingInclude Cppcheck warnings 2025-11-04 13:41:26 +01:00
matt335672 5853a781b9 Update to cppcheck 2.18.0 2025-10-31 20:30:24 +00:00
matt335672 82c95faaa9 Allow a cppcheck check_level to be specified
Version 2.14.0 of cppcheck generates errors relating to the
check level (e.g.):-

    common/base64.c:0:0: information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

This does not happen with the same sources (commit
f781962a55) under 2.13.0.

This PR disables the warnings above for 2.14.0, but also allows a '-f'
argument to be passed in to request an exhaustive test. This could be used
(for example) before a major release. An exhaustive test takes a *lot*
longer. The first run with a git runner was around an hour.

The --check-level=flag was only added for 2.11.0, and so this now needs
a version check.
2024-09-02 15:36:50 +01:00
firewave f687174af1 provide more includes to Cppcheck
- added (temporary) suppression of Cppcheck `shiftTooManyBits` false positives in `libxrdp/xrdp_mppc_enc.c`
- added (temporary) suppression of Cppcheck `uninitMemberVar` true positives in `ulalaca/ulalaca.cpp` until fixes land downstream
- fix Cppcheck `nullPointerRedundantCheck` in `sesman/chansrv/clipboard.c`
- fix Cppcheck `syntaxError` in `fontutils/mkfv1.c` because it doesn't see the `freetype/fterrors.h` header / removed astyle workaround
2023-10-17 15:14:36 +02:00
matt335672 d77b0b3b9d Bump cppcheck to v2.11
This fixes the following errors:-

sesman/tools/authtest.c:64:14: error: syntax error [syntaxError]
    g_printf("xrdp auth module tester v" PACKAGE_VERSION "\n");
             ^
sesman/tools/sesrun.c:165:14: error: syntax error [syntaxError]
    g_printf("xrdp session starter v" PACKAGE_VERSION "\n");
             ^
vrplayer/decoder.h:35:12: error: There is an unknown macro here somewhere. Configuration is required. If slots is a macro then please configure it. [unknownMacro]
    public slots:
           ^
vrplayer/playaudio.h:45:12: error: There is an unknown macro here somewhere. Configuration is required. If slots is a macro then please configure it. [unknownMacro]
    public slots:
           ^
vrplayer/dlgabout.h:22:13: error: There is an unknown macro here somewhere. Configuration is required. If slots is a macro then please configure it. [unknownMacro]
    private slots:
            ^
vrplayer/playvideo.h:49:12: error: There is an unknown macro here somewhere. Configuration is required. If slots is a macro then please configure it. [unknownMacro]
    public slots:
           ^
Additionally, cppcheck now makes use of all available CPUs
2023-06-23 15:12:51 +01:00
Koichiro IWAO cd1c479069 CI: skip running cppcheck on third_party sources 2023-04-03 15:51:10 +09:00
a1346054 59f8d9fe07 fix some shellcheck warnings 2022-09-03 02:05:08 +00:00
matt335672 baf62457a3 Move to cppcheck 2.7 and bump default threads to 2 2022-02-07 09:31:34 +00:00
matt335672 2faf98ca61 Add cppcheck to travis-ci 2020-03-03 10:33:17 +00:00