Skip to content

Commit ca5d5ed

Browse files
Merge branch 'cppcheck-opensource:main' into strerror.is.thread.safe
2 parents 83e4b63 + 2d75160 commit ca5d5ed

228 files changed

Lines changed: 8012 additions & 3000 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/CI-cygwin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
runs-on: ${{ matrix.os }}
3838

3939
steps:
40-
- uses: actions/checkout@v4
40+
- uses: actions/checkout@v6
4141
with:
4242
persist-credentials: false
4343

.github/workflows/CI-mingw.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
timeout-minutes: 19 # max + 3*std of the last 7K runs
3434

3535
steps:
36-
- uses: actions/checkout@v4
36+
- uses: actions/checkout@v6
3737
with:
3838
persist-credentials: false
3939

.github/workflows/CI-unixish-docker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
image: ${{ matrix.image }}
4444

4545
steps:
46-
- uses: actions/checkout@v4
46+
- uses: actions/checkout@v6
4747
with:
4848
persist-credentials: false
4949

@@ -72,7 +72,7 @@ jobs:
7272

7373
- name: Run CMake
7474
run: |
75-
cmake -S . -B cmake.output -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=${{ matrix.with_gui }} -DWITH_QCHART=On -DBUILD_TRIAGE=${{ matrix.with_gui }} -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
75+
cmake -S . -B cmake.output -Werror=dev --warn-uninitialized -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=${{ matrix.with_gui }} -DWITH_QCHART=On -DBUILD_TRIAGE=${{ matrix.with_gui }} -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
7676
7777
- name: CMake build
7878
if: matrix.full_build
@@ -96,7 +96,7 @@ jobs:
9696
image: ${{ matrix.image }}
9797

9898
steps:
99-
- uses: actions/checkout@v4
99+
- uses: actions/checkout@v6
100100
with:
101101
persist-credentials: false
102102

.github/workflows/CI-unixish.yml

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
CCACHE_SLOPPINESS: pch_defines,time_macros
3131

3232
steps:
33-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@v6
3434
with:
3535
persist-credentials: false
3636

@@ -58,13 +58,13 @@ jobs:
5858
- name: CMake build on ubuntu (with GUI / system tinyxml2)
5959
if: contains(matrix.os, 'ubuntu')
6060
run: |
61-
cmake -S . -B cmake.output.tinyxml2 -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DUSE_BUNDLED_TINYXML2=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
61+
cmake -S . -B cmake.output.tinyxml2 -Werror=dev --warn-uninitialized -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DUSE_BUNDLED_TINYXML2=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
6262
cmake --build cmake.output.tinyxml2 -- -j$(nproc)
6363
6464
- name: CMake build on macos (with GUI / system tinyxml2)
6565
if: contains(matrix.os, 'macos')
6666
run: |
67-
cmake -S . -B cmake.output.tinyxml2 -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DUSE_BUNDLED_TINYXML2=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
67+
cmake -S . -B cmake.output.tinyxml2 -Werror=dev --warn-uninitialized -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DUSE_BUNDLED_TINYXML2=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
6868
cmake --build cmake.output.tinyxml2 -- -j$(nproc)
6969
7070
- name: Run CMake test (system tinyxml2)
@@ -85,7 +85,7 @@ jobs:
8585
CCACHE_SLOPPINESS: pch_defines,time_macros
8686

8787
steps:
88-
- uses: actions/checkout@v4
88+
- uses: actions/checkout@v6
8989
with:
9090
persist-credentials: false
9191

@@ -97,7 +97,7 @@ jobs:
9797
# TODO: move latest compiler to separate step
9898
# TODO: bail out on warnings with latest GCC
9999
- name: Set up GCC
100-
uses: egor-tensin/setup-gcc@v1
100+
uses: egor-tensin/setup-gcc@v2
101101
if: false # matrix.os == 'ubuntu-22.04'
102102
with:
103103
version: 13
@@ -127,12 +127,12 @@ jobs:
127127
- name: Run CMake on ubuntu (with GUI)
128128
if: contains(matrix.os, 'ubuntu')
129129
run: |
130-
cmake -S . -B cmake.output -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=cppcheck-cmake-install
130+
cmake -S . -B cmake.output -Werror=dev --warn-uninitialized -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=cppcheck-cmake-install
131131
132132
- name: Run CMake on macos (with GUI)
133133
if: contains(matrix.os, 'macos')
134134
run: |
135-
cmake -S . -B cmake.output -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=cppcheck-cmake-install -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
135+
cmake -S . -B cmake.output -Werror=dev --warn-uninitialized -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=cppcheck-cmake-install -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
136136
137137
- name: Run CMake build
138138
run: |
@@ -150,17 +150,18 @@ jobs:
150150
- name: Run CMake install
151151
run: |
152152
cmake --build cmake.output --target install
153+
# TODO: validate the installed files
153154
154155
- name: Run CMake on ubuntu (no CLI)
155156
if: matrix.os == 'ubuntu-22.04'
156157
run: |
157-
cmake -S . -B cmake.output_nocli -Werror=dev -DBUILD_TESTING=Off -DBUILD_CLI=Off
158+
cmake -S . -B cmake.output_nocli -Werror=dev --warn-uninitialized -DBUILD_TESTING=Off -DBUILD_CLI=Off
158159
159160
- name: Run CMake on ubuntu (no CLI / with tests)
160161
if: matrix.os == 'ubuntu-22.04'
161162
run: |
162163
# the test and CLI code are too intertwined so for now we need to reject that
163-
if cmake -S . -B cmake.output_nocli_tests -Werror=dev -DBUILD_TESTING=On -DBUILD_CLI=Off; then
164+
if cmake -S . -B cmake.output_nocli_tests -Werror=dev --warn-uninitialized -DBUILD_TESTING=On -DBUILD_CLI=Off; then
164165
exit 1
165166
else
166167
exit 0
@@ -169,18 +170,18 @@ jobs:
169170
- name: Run CMake on ubuntu (no CLI / with GUI)
170171
if: matrix.os == 'ubuntu-22.04'
171172
run: |
172-
cmake -S . -B cmake.output_nocli_gui -Werror=dev -DBUILD_TESTING=Off -DBUILD_CLI=Off -DBUILD_GUI=On
173+
cmake -S . -B cmake.output_nocli_gui -Werror=dev --warn-uninitialized -DBUILD_TESTING=Off -DBUILD_CLI=Off -DBUILD_GUI=On
173174
174175
- name: Run CMake on ubuntu (no GUI)
175176
if: matrix.os == 'ubuntu-22.04'
176177
run: |
177-
cmake -S . -B cmake.output_nogui -Werror=dev -DBUILD_TESTING=Off -DBUILD_GUI=Off
178+
cmake -S . -B cmake.output_nogui -Werror=dev --warn-uninitialized -DBUILD_TESTING=Off -DBUILD_GUI=Off
178179
179180
- name: Run CMake on ubuntu (no GUI / with triage)
180181
if: matrix.os == 'ubuntu-22.04'
181182
run: |
182183
# cannot build triage without GUI
183-
if cmake -S . -B cmake.output_nogui_triage -Werror=dev -DBUILD_TESTING=Off -DBUILD_GUI=Off -DBUILD_TRIAGE=On; then
184+
if cmake -S . -B cmake.output_nogui_triage -Werror=dev --warn-uninitialized -DBUILD_TESTING=Off -DBUILD_GUI=Off -DBUILD_TRIAGE=On; then
184185
exit 1
185186
else
186187
exit 0
@@ -189,7 +190,7 @@ jobs:
189190
- name: Run CMake on ubuntu (no CLI / no GUI)
190191
if: matrix.os == 'ubuntu-22.04'
191192
run: |
192-
cmake -S . -B cmake.output_nocli_nogui -Werror=dev -DBUILD_TESTING=Off -DBUILD_GUI=Off
193+
cmake -S . -B cmake.output_nocli_nogui -Werror=dev --warn-uninitialized -DBUILD_TESTING=Off -DBUILD_GUI=Off
193194
194195
build_cmake_cxxstd:
195196

@@ -215,7 +216,7 @@ jobs:
215216
CCACHE_SLOPPINESS: pch_defines,time_macros
216217

217218
steps:
218-
- uses: actions/checkout@v4
219+
- uses: actions/checkout@v6
219220
with:
220221
persist-credentials: false
221222

@@ -243,12 +244,12 @@ jobs:
243244
- name: Run CMake on ubuntu (with GUI)
244245
if: contains(matrix.os, 'ubuntu')
245246
run: |
246-
cmake -S . -B cmake.output -Werror=dev -DCMAKE_CXX_STANDARD=${{ matrix.cxxstd }} -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
247+
cmake -S . -B cmake.output -Werror=dev --warn-uninitialized -DCMAKE_CXX_STANDARD=${{ matrix.cxxstd }} -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
247248
248249
- name: Run CMake on macos (with GUI)
249250
if: contains(matrix.os, 'macos')
250251
run: |
251-
cmake -S . -B cmake.output -Werror=dev -DCMAKE_CXX_STANDARD=${{ matrix.cxxstd }} -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
252+
cmake -S . -B cmake.output -Werror=dev --warn-uninitialized -DCMAKE_CXX_STANDARD=${{ matrix.cxxstd }} -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6
252253
253254
- name: Run CMake build
254255
run: |
@@ -264,7 +265,7 @@ jobs:
264265
runs-on: ${{ matrix.os }}
265266

266267
steps:
267-
- uses: actions/checkout@v4
268+
- uses: actions/checkout@v6
268269
with:
269270
persist-credentials: false
270271

@@ -298,7 +299,7 @@ jobs:
298299
runs-on: ${{ matrix.os }}
299300

300301
steps:
301-
- uses: actions/checkout@v4
302+
- uses: actions/checkout@v6
302303
with:
303304
persist-credentials: false
304305

@@ -332,7 +333,7 @@ jobs:
332333
runs-on: ${{ matrix.os }}
333334

334335
steps:
335-
- uses: actions/checkout@v4
336+
- uses: actions/checkout@v6
336337
with:
337338
persist-credentials: false
338339

@@ -360,7 +361,7 @@ jobs:
360361
CCACHE_SLOPPINESS: pch_defines,time_macros
361362

362363
steps:
363-
- uses: actions/checkout@v4
364+
- uses: actions/checkout@v6
364365
with:
365366
persist-credentials: false
366367

@@ -373,7 +374,7 @@ jobs:
373374
run: |
374375
# make sure we fail when Boost is requested and not available.
375376
# will fail because no package configuration is available.
376-
if cmake -S . -B cmake.output.boost-force-noavail -Werror=dev -DBUILD_TESTING=Off -DUSE_BOOST=On; then
377+
if cmake -S . -B cmake.output.boost-force-noavail -Werror=dev --warn-uninitialized -DBUILD_TESTING=Off -DUSE_BOOST=On; then
377378
exit 1
378379
else
379380
exit 0
@@ -386,12 +387,12 @@ jobs:
386387
387388
- name: Run CMake on macOS (force Boost)
388389
run: |
389-
cmake -S . -B cmake.output.boost-force -Werror=dev -DBUILD_TESTING=Off -DUSE_BOOST=On
390+
cmake -S . -B cmake.output.boost-force -Werror=dev --warn-uninitialized -DBUILD_TESTING=Off -DUSE_BOOST=On
390391
391392
- name: Run CMake on macOS (no Boost)
392393
run: |
393394
# make sure Boost is not used when disabled even though it is available
394-
cmake -S . -B cmake.output.boost-no -Werror=dev -DBUILD_TESTING=Off -DUSE_BOOST=Off
395+
cmake -S . -B cmake.output.boost-no -Werror=dev --warn-uninitialized -DBUILD_TESTING=Off -DUSE_BOOST=Off
395396
if grep -q '\-DHAVE_BOOST' ./cmake.output.boost-no/compile_commands.json; then
396397
exit 1
397398
else
@@ -400,7 +401,7 @@ jobs:
400401
401402
- name: Run CMake on macOS (with Boost)
402403
run: |
403-
cmake -S . -B cmake.output.boost -Werror=dev -DBUILD_TESTING=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
404+
cmake -S . -B cmake.output.boost -Werror=dev --warn-uninitialized -DBUILD_TESTING=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
404405
grep -q '\-DHAVE_BOOST' ./cmake.output.boost/compile_commands.json
405406
406407
- name: Build with CMake on macOS (with Boost)
@@ -416,7 +417,7 @@ jobs:
416417
CMAKE_VERSION_FULL: 3.22.6
417418

418419
steps:
419-
- uses: actions/checkout@v4
420+
- uses: actions/checkout@v6
420421
with:
421422
persist-credentials: false
422423

@@ -436,11 +437,13 @@ jobs:
436437
- name: Run CMake (without GUI)
437438
run: |
438439
export PATH=cmake-${{ env.CMAKE_VERSION_FULL }}-linux-x86_64/bin:$PATH
440+
# FIXME: cannot use --warn-uninitialized here as it completely breaks the build
439441
cmake -S . -B cmake.output -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On
440442
441443
- name: Run CMake (with GUI)
442444
run: |
443445
export PATH=cmake-${{ env.CMAKE_VERSION_FULL }}-linux-x86_64/bin:$PATH
446+
# FIXME: cannot use --warn-uninitialized here as it completely breaks the build
444447
cmake -S . -B cmake.output.gui -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On
445448
446449
build:
@@ -458,7 +461,7 @@ jobs:
458461
runs-on: ${{ matrix.os }}
459462

460463
steps:
461-
- uses: actions/checkout@v4
464+
- uses: actions/checkout@v6
462465
with:
463466
persist-credentials: false
464467

@@ -596,7 +599,7 @@ jobs:
596599
597600
- name: Test Signalhandler
598601
run: |
599-
cmake -S . -B build.cmake.signal -Werror=dev -DBUILD_TESTING=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On
602+
cmake -S . -B build.cmake.signal -Werror=dev --warn-uninitialized -DBUILD_TESTING=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On
600603
cmake --build build.cmake.signal --target test-signalhandler -- -j$(nproc)
601604
# TODO: how to run this without copying the file?
602605
cp build.cmake.signal/bin/test-s* .
@@ -607,7 +610,7 @@ jobs:
607610
- name: Test Stacktrace
608611
if: contains(matrix.os, 'ubuntu')
609612
run: |
610-
cmake -S . -B build.cmake.stack -Werror=dev -DBUILD_TESTING=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On
613+
cmake -S . -B build.cmake.stack -Werror=dev --warn-uninitialized -DBUILD_TESTING=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On
611614
cmake --build build.cmake.stack --target test-stacktrace -- -j$(nproc)
612615
# TODO: how to run this without copying the file?
613616
cp build.cmake.stack/bin/test-s* .
@@ -709,7 +712,7 @@ jobs:
709712
runs-on: ubuntu-22.04 # run on the latest image only
710713

711714
steps:
712-
- uses: actions/checkout@v4
715+
- uses: actions/checkout@v6
713716
with:
714717
persist-credentials: false
715718

@@ -734,7 +737,7 @@ jobs:
734737
735738
- name: CMake
736739
run: |
737-
cmake -S . -B cmake.output -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DUSE_MATCHCOMPILER=Verify -DENABLE_CHECK_INTERNAL=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On
740+
cmake -S . -B cmake.output -Werror=dev --warn-uninitialized -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DUSE_MATCHCOMPILER=Verify -DENABLE_CHECK_INTERNAL=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On
738741
739742
- name: Generate dependencies
740743
run: |

0 commit comments

Comments
 (0)