From 1721205ed81dc4198f1cd7789e06aa16143bff2a Mon Sep 17 00:00:00 2001 From: Ozan Tezcan Date: Sat, 15 Feb 2025 10:47:13 +0300 Subject: [PATCH 01/15] Fix build --- .github/workflows/.aarch64.yml | 2 +- .github/workflows/.ppc64le.yml | 2 +- .github/workflows/.riscv64.yml | 2 +- .github/workflows/.s390x.yml | 2 +- .github/workflows/.ubuntu.yml | 2 +- CMakeLists.txt | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/.aarch64.yml b/.github/workflows/.aarch64.yml index cdd2230..d2440f4 100644 --- a/.github/workflows/.aarch64.yml +++ b/.github/workflows/.aarch64.yml @@ -20,7 +20,7 @@ jobs: id: build with: arch: aarch64 - distro: ubuntu20.04 + distro: ubuntu24.04 # Not required, but speeds up builds githubToken: ${{ github.token }} diff --git a/.github/workflows/.ppc64le.yml b/.github/workflows/.ppc64le.yml index 56cb755..2aeeece 100644 --- a/.github/workflows/.ppc64le.yml +++ b/.github/workflows/.ppc64le.yml @@ -20,7 +20,7 @@ jobs: id: build with: arch: ppc64le - distro: ubuntu20.04 + distro: ubuntu24.04 # Not required, but speeds up builds githubToken: ${{ github.token }} diff --git a/.github/workflows/.riscv64.yml b/.github/workflows/.riscv64.yml index 65dd8da..a924f87 100644 --- a/.github/workflows/.riscv64.yml +++ b/.github/workflows/.riscv64.yml @@ -20,7 +20,7 @@ jobs: id: build with: arch: riscv64 - distro: ubuntu20.04 + distro: ubuntu24.04 # Not required, but speeds up builds githubToken: ${{ github.token }} diff --git a/.github/workflows/.s390x.yml b/.github/workflows/.s390x.yml index caa6083..ecb5e31 100644 --- a/.github/workflows/.s390x.yml +++ b/.github/workflows/.s390x.yml @@ -20,7 +20,7 @@ jobs: id: build with: arch: s390x - distro: ubuntu20.04 + distro: ubuntu24.04 # Not required, but speeds up builds githubToken: ${{ github.token }} diff --git a/.github/workflows/.ubuntu.yml b/.github/workflows/.ubuntu.yml index e0cda83..57dbb56 100644 --- a/.github/workflows/.ubuntu.yml +++ b/.github/workflows/.ubuntu.yml @@ -17,7 +17,7 @@ on: jobs: ubuntu: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: | (github.event_name == 'pull_request') || (github.event_name == 'push') || diff --git a/CMakeLists.txt b/CMakeLists.txt index c33fea3..57a51d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,10 +69,10 @@ if (SC_BUILD_TEST) add_custom_command( TARGET coverage COMMAND lcov --capture --directory . - --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' + --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' --ignore-errors unused COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' - --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' - COMMAND lcov --list coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' + --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' --ignore-errors unused + COMMAND lcov --list coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' --ignore-errors unused ) # -------------------------- Code Coverage End ------------------------------ # From a7a9b01ef85e174b0f94ce70e519c6620920a4f2 Mon Sep 17 00:00:00 2001 From: Ozan Tezcan Date: Sat, 15 Feb 2025 10:49:27 +0300 Subject: [PATCH 02/15] Fix build --- .github/workflows/.aarch64.yml | 2 +- .github/workflows/.ppc64le.yml | 2 +- .github/workflows/.riscv64.yml | 2 +- .github/workflows/.s390x.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/.aarch64.yml b/.github/workflows/.aarch64.yml index d2440f4..55becd9 100644 --- a/.github/workflows/.aarch64.yml +++ b/.github/workflows/.aarch64.yml @@ -20,7 +20,7 @@ jobs: id: build with: arch: aarch64 - distro: ubuntu24.04 + distro: ubuntu22.04 # Not required, but speeds up builds githubToken: ${{ github.token }} diff --git a/.github/workflows/.ppc64le.yml b/.github/workflows/.ppc64le.yml index 2aeeece..7eccab6 100644 --- a/.github/workflows/.ppc64le.yml +++ b/.github/workflows/.ppc64le.yml @@ -20,7 +20,7 @@ jobs: id: build with: arch: ppc64le - distro: ubuntu24.04 + distro: ubuntu22.04 # Not required, but speeds up builds githubToken: ${{ github.token }} diff --git a/.github/workflows/.riscv64.yml b/.github/workflows/.riscv64.yml index a924f87..c2167a5 100644 --- a/.github/workflows/.riscv64.yml +++ b/.github/workflows/.riscv64.yml @@ -20,7 +20,7 @@ jobs: id: build with: arch: riscv64 - distro: ubuntu24.04 + distro: ubuntu22.04 # Not required, but speeds up builds githubToken: ${{ github.token }} diff --git a/.github/workflows/.s390x.yml b/.github/workflows/.s390x.yml index ecb5e31..d26a43a 100644 --- a/.github/workflows/.s390x.yml +++ b/.github/workflows/.s390x.yml @@ -20,7 +20,7 @@ jobs: id: build with: arch: s390x - distro: ubuntu24.04 + distro: ubuntu22.04 # Not required, but speeds up builds githubToken: ${{ github.token }} From 75a3a340a4d7aea4d86aa81ed275d5978d924e15 Mon Sep 17 00:00:00 2001 From: Ozan Tezcan Date: Sat, 15 Feb 2025 10:52:16 +0300 Subject: [PATCH 03/15] Fix build --- .github/workflows/.aarch64.yml | 2 +- .github/workflows/.armv6.yml | 2 +- .github/workflows/.armv7.yml | 2 +- .github/workflows/.ppc64le.yml | 2 +- .github/workflows/.riscv64.yml | 2 +- .github/workflows/.s390x.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/.aarch64.yml b/.github/workflows/.aarch64.yml index 55becd9..d7b5216 100644 --- a/.github/workflows/.aarch64.yml +++ b/.github/workflows/.aarch64.yml @@ -15,7 +15,7 @@ jobs: name: Build on aarch64 steps: - uses: actions/checkout@v2.1.0 - - uses: uraimo/run-on-arch-action@v2.1.1 + - uses: uraimo/run-on-arch-action@v2.8.1 name: Build artifact id: build with: diff --git a/.github/workflows/.armv6.yml b/.github/workflows/.armv6.yml index e260ca0..80af0c5 100644 --- a/.github/workflows/.armv6.yml +++ b/.github/workflows/.armv6.yml @@ -15,7 +15,7 @@ jobs: name: Build on armv6 steps: - uses: actions/checkout@v2.1.0 - - uses: uraimo/run-on-arch-action@v2.1.1 + - uses: uraimo/run-on-arch-action@v2.8.1 name: Build artifact id: build with: diff --git a/.github/workflows/.armv7.yml b/.github/workflows/.armv7.yml index 61f8756..b79a946 100644 --- a/.github/workflows/.armv7.yml +++ b/.github/workflows/.armv7.yml @@ -15,7 +15,7 @@ jobs: name: Build on armv7 steps: - uses: actions/checkout@v2.1.0 - - uses: uraimo/run-on-arch-action@v2.1.1 + - uses: uraimo/run-on-arch-action@v2.8.1 name: Build artifact id: build with: diff --git a/.github/workflows/.ppc64le.yml b/.github/workflows/.ppc64le.yml index 7eccab6..1eecba6 100644 --- a/.github/workflows/.ppc64le.yml +++ b/.github/workflows/.ppc64le.yml @@ -15,7 +15,7 @@ jobs: name: Build on ppc64le steps: - uses: actions/checkout@v2.1.0 - - uses: uraimo/run-on-arch-action@v2.1.1 + - uses: uraimo/run-on-arch-action@v2.8.1 name: Build artifact id: build with: diff --git a/.github/workflows/.riscv64.yml b/.github/workflows/.riscv64.yml index c2167a5..a9db464 100644 --- a/.github/workflows/.riscv64.yml +++ b/.github/workflows/.riscv64.yml @@ -15,7 +15,7 @@ jobs: name: Build on riscv64 steps: - uses: actions/checkout@v2.1.0 - - uses: uraimo/run-on-arch-action@v2.5.1 + - uses: uraimo/run-on-arch-action@v2.8.1 name: Build artifact id: build with: diff --git a/.github/workflows/.s390x.yml b/.github/workflows/.s390x.yml index d26a43a..5d3ea30 100644 --- a/.github/workflows/.s390x.yml +++ b/.github/workflows/.s390x.yml @@ -15,7 +15,7 @@ jobs: name: Build on s390x steps: - uses: actions/checkout@v2.1.0 - - uses: uraimo/run-on-arch-action@v2.1.1 + - uses: uraimo/run-on-arch-action@v2.8.1 name: Build artifact id: build with: From 1973eb123ffb0f764382e50c7084a5f6f08cb641 Mon Sep 17 00:00:00 2001 From: Ozan Tezcan Date: Sat, 15 Feb 2025 11:14:54 +0300 Subject: [PATCH 04/15] Fix build --- CMakeLists.txt | 1 + array/CMakeLists.txt | 1 + buffer/CMakeLists.txt | 1 + condition/CMakeLists.txt | 3 ++- crc32/CMakeLists.txt | 1 + heap/CMakeLists.txt | 3 ++- ini/CMakeLists.txt | 1 + linked-list/CMakeLists.txt | 1 + logger/CMakeLists.txt | 3 ++- map/CMakeLists.txt | 1 + memory-map/CMakeLists.txt | 3 ++- mutex/CMakeLists.txt | 1 + option/CMakeLists.txt | 1 + queue/CMakeLists.txt | 1 + sc/CMakeLists.txt | 3 ++- signal/CMakeLists.txt | 1 + socket/CMakeLists.txt | 1 + string/CMakeLists.txt | 3 ++- thread/CMakeLists.txt | 3 ++- time/CMakeLists.txt | 3 ++- timer/CMakeLists.txt | 3 ++- uri/CMakeLists.txt | 1 + 22 files changed, 31 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 57a51d0..051e541 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage) add_custom_command( TARGET coverage + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' --ignore-errors unused COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/array/CMakeLists.txt b/array/CMakeLists.txt index c3cd1b7..b7c1fd5 100644 --- a/array/CMakeLists.txt +++ b/array/CMakeLists.txt @@ -96,6 +96,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/buffer/CMakeLists.txt b/buffer/CMakeLists.txt index dba2981..e814dbe 100644 --- a/buffer/CMakeLists.txt +++ b/buffer/CMakeLists.txt @@ -95,6 +95,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/condition/CMakeLists.txt b/condition/CMakeLists.txt index 92981f7..4d9e410 100644 --- a/condition/CMakeLists.txt +++ b/condition/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-reserved-identifier*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-reserved-identifier*,-misc-include-cleaner; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () @@ -96,6 +96,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/crc32/CMakeLists.txt b/crc32/CMakeLists.txt index 835ff7d..44068aa 100644 --- a/crc32/CMakeLists.txt +++ b/crc32/CMakeLists.txt @@ -113,6 +113,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/heap/CMakeLists.txt b/heap/CMakeLists.txt index 28a8816..f4a2925 100644 --- a/heap/CMakeLists.txt +++ b/heap/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-misc-include-cleaner; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () @@ -94,6 +94,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/ini/CMakeLists.txt b/ini/CMakeLists.txt index 8cff57f..fdd83cd 100644 --- a/ini/CMakeLists.txt +++ b/ini/CMakeLists.txt @@ -93,6 +93,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/linked-list/CMakeLists.txt b/linked-list/CMakeLists.txt index 6cee86c..beb7325 100644 --- a/linked-list/CMakeLists.txt +++ b/linked-list/CMakeLists.txt @@ -83,6 +83,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/logger/CMakeLists.txt b/logger/CMakeLists.txt index 94a3ce0..44bea1c 100644 --- a/logger/CMakeLists.txt +++ b/logger/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-bugprone-reserved-identifier*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-bugprone-reserved-identifier*,-misc-include-cleaner; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () @@ -96,6 +96,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/map/CMakeLists.txt b/map/CMakeLists.txt index 169aff5..5586070 100644 --- a/map/CMakeLists.txt +++ b/map/CMakeLists.txt @@ -103,6 +103,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/memory-map/CMakeLists.txt b/memory-map/CMakeLists.txt index e68c609..f1f6f35 100644 --- a/memory-map/CMakeLists.txt +++ b/memory-map/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-bugprone-reserved-identifier*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-bugprone-reserved-identifier*,-misc-include-cleaner; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () @@ -98,6 +98,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/mutex/CMakeLists.txt b/mutex/CMakeLists.txt index f88edfb..4395bde 100644 --- a/mutex/CMakeLists.txt +++ b/mutex/CMakeLists.txt @@ -97,6 +97,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/option/CMakeLists.txt b/option/CMakeLists.txt index 81cf973..f45d68d 100644 --- a/option/CMakeLists.txt +++ b/option/CMakeLists.txt @@ -97,6 +97,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/queue/CMakeLists.txt b/queue/CMakeLists.txt index 024b263..91adcb1 100644 --- a/queue/CMakeLists.txt +++ b/queue/CMakeLists.txt @@ -98,6 +98,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/sc/CMakeLists.txt b/sc/CMakeLists.txt index 2069930..44da9f9 100644 --- a/sc/CMakeLists.txt +++ b/sc/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-misc-include-cleaner; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () @@ -96,6 +96,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/signal/CMakeLists.txt b/signal/CMakeLists.txt index 6a2eff1..5fdc4f5 100644 --- a/signal/CMakeLists.txt +++ b/signal/CMakeLists.txt @@ -126,6 +126,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/socket/CMakeLists.txt b/socket/CMakeLists.txt index 48694df..369b334 100644 --- a/socket/CMakeLists.txt +++ b/socket/CMakeLists.txt @@ -110,6 +110,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/string/CMakeLists.txt b/string/CMakeLists.txt index fb93b2d..9a28a64 100644 --- a/string/CMakeLists.txt +++ b/string/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-misc-include-cleaner; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () @@ -95,6 +95,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/thread/CMakeLists.txt b/thread/CMakeLists.txt index 388d195..e5e42a3 100644 --- a/thread/CMakeLists.txt +++ b/thread/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-misc-include-cleaner; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () @@ -95,6 +95,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/time/CMakeLists.txt b/time/CMakeLists.txt index 7092252..98ecd58 100644 --- a/time/CMakeLists.txt +++ b/time/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-reserved-identifier*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-reserved-identifier*,-misc-include-cleaner; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () @@ -94,6 +94,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/timer/CMakeLists.txt b/timer/CMakeLists.txt index a5bb126..4e8fa9c 100644 --- a/timer/CMakeLists.txt +++ b/timer/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-bugprone-implicit-widening-of-multiplication-result*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-bugprone-implicit-widening-of-multiplication-result*, -misc-include-cleaner; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () @@ -96,6 +96,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' diff --git a/uri/CMakeLists.txt b/uri/CMakeLists.txt index 9920ac1..370ea44 100644 --- a/uri/CMakeLists.txt +++ b/uri/CMakeLists.txt @@ -94,6 +94,7 @@ if (SC_BUILD_TEST) add_custom_target(coverage_${PROJECT_NAME}) add_custom_command( TARGET coverage_${PROJECT_NAME} + POST_BUILD COMMAND lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*' From d721c3ed060604d58eab22dc8c2cc2beb47a2bf8 Mon Sep 17 00:00:00 2001 From: Ozan Tezcan Date: Sat, 15 Feb 2025 11:21:48 +0300 Subject: [PATCH 05/15] Fix build --- CMakeLists.txt | 2 +- array/CMakeLists.txt | 2 +- buffer/CMakeLists.txt | 2 +- condition/CMakeLists.txt | 2 +- crc32/CMakeLists.txt | 2 +- heap/CMakeLists.txt | 2 +- ini/CMakeLists.txt | 2 +- linked-list/CMakeLists.txt | 2 +- logger/CMakeLists.txt | 2 +- map/CMakeLists.txt | 2 +- memory-map/CMakeLists.txt | 2 +- mutex/CMakeLists.txt | 2 +- option/CMakeLists.txt | 2 +- perf/CMakeLists.txt | 2 +- queue/CMakeLists.txt | 2 +- sc/CMakeLists.txt | 2 +- signal/CMakeLists.txt | 2 +- socket/CMakeLists.txt | 2 +- string/CMakeLists.txt | 2 +- thread/CMakeLists.txt | 2 +- time/CMakeLists.txt | 2 +- timer/CMakeLists.txt | 2 +- uri/CMakeLists.txt | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 051e541..ef153e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_lib C) include(CTest) include(CheckCCompilerFlag) diff --git a/array/CMakeLists.txt b/array/CMakeLists.txt index b7c1fd5..9a7ab50 100644 --- a/array/CMakeLists.txt +++ b/array/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_array C) set(CMAKE_C_STANDARD 99) diff --git a/buffer/CMakeLists.txt b/buffer/CMakeLists.txt index e814dbe..f6ee328 100644 --- a/buffer/CMakeLists.txt +++ b/buffer/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_buf C) set(CMAKE_C_STANDARD 99) diff --git a/condition/CMakeLists.txt b/condition/CMakeLists.txt index 4d9e410..0cdc8b6 100644 --- a/condition/CMakeLists.txt +++ b/condition/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_cond C) set(CMAKE_C_STANDARD 99) diff --git a/crc32/CMakeLists.txt b/crc32/CMakeLists.txt index 44068aa..aea88a6 100644 --- a/crc32/CMakeLists.txt +++ b/crc32/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_crc32 C) set(CMAKE_C_STANDARD 99) diff --git a/heap/CMakeLists.txt b/heap/CMakeLists.txt index f4a2925..c1dd868 100644 --- a/heap/CMakeLists.txt +++ b/heap/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_heap C) set(CMAKE_C_STANDARD 99) diff --git a/ini/CMakeLists.txt b/ini/CMakeLists.txt index fdd83cd..c7bbdbc 100644 --- a/ini/CMakeLists.txt +++ b/ini/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_ini C) set(CMAKE_C_STANDARD 99) diff --git a/linked-list/CMakeLists.txt b/linked-list/CMakeLists.txt index beb7325..5b2ed7e 100644 --- a/linked-list/CMakeLists.txt +++ b/linked-list/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_list C) set(CMAKE_C_STANDARD 99) diff --git a/logger/CMakeLists.txt b/logger/CMakeLists.txt index 44bea1c..95e37a5 100644 --- a/logger/CMakeLists.txt +++ b/logger/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_log C) set(CMAKE_C_STANDARD 99) diff --git a/map/CMakeLists.txt b/map/CMakeLists.txt index 5586070..278714b 100644 --- a/map/CMakeLists.txt +++ b/map/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_map C) set(CMAKE_C_STANDARD 99) diff --git a/memory-map/CMakeLists.txt b/memory-map/CMakeLists.txt index f1f6f35..150270b 100644 --- a/memory-map/CMakeLists.txt +++ b/memory-map/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_mmap C) set(CMAKE_C_STANDARD 99) diff --git a/mutex/CMakeLists.txt b/mutex/CMakeLists.txt index 4395bde..a4087f2 100644 --- a/mutex/CMakeLists.txt +++ b/mutex/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_mutex C) set(CMAKE_C_STANDARD 99) diff --git a/option/CMakeLists.txt b/option/CMakeLists.txt index f45d68d..7980040 100644 --- a/option/CMakeLists.txt +++ b/option/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_option C) set(CMAKE_C_STANDARD 99) diff --git a/perf/CMakeLists.txt b/perf/CMakeLists.txt index cd872e8..fe94120 100644 --- a/perf/CMakeLists.txt +++ b/perf/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_perf C) set(CMAKE_C_STANDARD 99) diff --git a/queue/CMakeLists.txt b/queue/CMakeLists.txt index 91adcb1..c73e371 100644 --- a/queue/CMakeLists.txt +++ b/queue/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_queue C) set(CMAKE_C_STANDARD 99) diff --git a/sc/CMakeLists.txt b/sc/CMakeLists.txt index 44da9f9..3dff024 100644 --- a/sc/CMakeLists.txt +++ b/sc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc C) set(CMAKE_C_STANDARD 99) diff --git a/signal/CMakeLists.txt b/signal/CMakeLists.txt index 5fdc4f5..967a2a4 100644 --- a/signal/CMakeLists.txt +++ b/signal/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_signal C) set(CMAKE_C_STANDARD 99) diff --git a/socket/CMakeLists.txt b/socket/CMakeLists.txt index 369b334..b5347c2 100644 --- a/socket/CMakeLists.txt +++ b/socket/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_socket C) set(CMAKE_C_STANDARD 99) diff --git a/string/CMakeLists.txt b/string/CMakeLists.txt index 9a28a64..aea1b1c 100644 --- a/string/CMakeLists.txt +++ b/string/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_str C) set(CMAKE_C_STANDARD 99) diff --git a/thread/CMakeLists.txt b/thread/CMakeLists.txt index e5e42a3..ad2ecd0 100644 --- a/thread/CMakeLists.txt +++ b/thread/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_thread C) set(CMAKE_C_STANDARD 99) diff --git a/time/CMakeLists.txt b/time/CMakeLists.txt index 98ecd58..95553f5 100644 --- a/time/CMakeLists.txt +++ b/time/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_time C) set(CMAKE_C_STANDARD 99) diff --git a/timer/CMakeLists.txt b/timer/CMakeLists.txt index 4e8fa9c..4d5763c 100644 --- a/timer/CMakeLists.txt +++ b/timer/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_timer C) set(CMAKE_C_STANDARD 99) diff --git a/uri/CMakeLists.txt b/uri/CMakeLists.txt index 370ea44..b521e7d 100644 --- a/uri/CMakeLists.txt +++ b/uri/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.10) project(sc_uri C) set(CMAKE_C_STANDARD 99) From ed65564ea8109bce818671ec868e96f193a657e1 Mon Sep 17 00:00:00 2001 From: Ozan Tezcan Date: Sat, 15 Feb 2025 11:23:12 +0300 Subject: [PATCH 06/15] Fix build --- condition/CMakeLists.txt | 2 +- heap/CMakeLists.txt | 2 +- logger/CMakeLists.txt | 2 +- memory-map/CMakeLists.txt | 2 +- sc/CMakeLists.txt | 2 +- string/CMakeLists.txt | 2 +- thread/CMakeLists.txt | 2 +- time/CMakeLists.txt | 2 +- timer/CMakeLists.txt | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/condition/CMakeLists.txt b/condition/CMakeLists.txt index 0cdc8b6..c9576b6 100644 --- a/condition/CMakeLists.txt +++ b/condition/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-reserved-identifier*,-misc-include-cleaner; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-reserved-identifier*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () diff --git a/heap/CMakeLists.txt b/heap/CMakeLists.txt index c1dd868..5a38269 100644 --- a/heap/CMakeLists.txt +++ b/heap/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-misc-include-cleaner; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () diff --git a/logger/CMakeLists.txt b/logger/CMakeLists.txt index 95e37a5..1213516 100644 --- a/logger/CMakeLists.txt +++ b/logger/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-bugprone-reserved-identifier*,-misc-include-cleaner; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-bugprone-reserved-identifier*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () diff --git a/memory-map/CMakeLists.txt b/memory-map/CMakeLists.txt index 150270b..757627a 100644 --- a/memory-map/CMakeLists.txt +++ b/memory-map/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-bugprone-reserved-identifier*,-misc-include-cleaner; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-bugprone-reserved-identifier*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () diff --git a/sc/CMakeLists.txt b/sc/CMakeLists.txt index 3dff024..b27ce6b 100644 --- a/sc/CMakeLists.txt +++ b/sc/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-misc-include-cleaner; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () diff --git a/string/CMakeLists.txt b/string/CMakeLists.txt index aea1b1c..13724b2 100644 --- a/string/CMakeLists.txt +++ b/string/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-misc-include-cleaner; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () diff --git a/thread/CMakeLists.txt b/thread/CMakeLists.txt index ad2ecd0..56db478 100644 --- a/thread/CMakeLists.txt +++ b/thread/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-misc-include-cleaner; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () diff --git a/time/CMakeLists.txt b/time/CMakeLists.txt index 95553f5..9dd0f24 100644 --- a/time/CMakeLists.txt +++ b/time/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-reserved-identifier*,-misc-include-cleaner; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-reserved-identifier*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () diff --git a/timer/CMakeLists.txt b/timer/CMakeLists.txt index 4d5763c..1f34b8a 100644 --- a/timer/CMakeLists.txt +++ b/timer/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-bugprone-implicit-widening-of-multiplication-result*, -misc-include-cleaner; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-bugprone-implicit-widening-of-multiplication-result*, -misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () From 8647d9db527493e9f12c5ec5171cea7139cef94b Mon Sep 17 00:00:00 2001 From: Ozan Tezcan Date: Sat, 15 Feb 2025 11:24:38 +0300 Subject: [PATCH 07/15] Fix build --- socket/sock_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/socket/sock_test.c b/socket/sock_test.c index 08b3343..48ba5f6 100644 --- a/socket/sock_test.c +++ b/socket/sock_test.c @@ -1755,7 +1755,7 @@ void test_poll_threadsafe(void) { enum { - THREAD_COUNT = 100 + THREAD_COUNT = 10 }; uint32_t ev; int rc, count, added = 0; From 46f2ff5e06bf5299f11259a4289a6276d9ad0c6c Mon Sep 17 00:00:00 2001 From: Ozan Tezcan Date: Sat, 15 Feb 2025 11:38:02 +0300 Subject: [PATCH 08/15] Fix build --- .github/workflows/.ubuntu.yml | 32 +++++++++++++++++++++++++++++++- buffer/CMakeLists.txt | 2 +- heap/CMakeLists.txt | 2 +- ini/CMakeLists.txt | 2 +- logger/sc_log.c | 3 ++- map/CMakeLists.txt | 2 +- mutex/CMakeLists.txt | 2 +- string/CMakeLists.txt | 2 +- 8 files changed, 39 insertions(+), 8 deletions(-) diff --git a/.github/workflows/.ubuntu.yml b/.github/workflows/.ubuntu.yml index 57dbb56..947f894 100644 --- a/.github/workflows/.ubuntu.yml +++ b/.github/workflows/.ubuntu.yml @@ -28,7 +28,7 @@ jobs: strategy: fail-fast: false matrix: - compiler: [ gcc, clang ] + compiler: gcc steps: - uses: actions/checkout@v2.1.0 - name: build @@ -50,6 +50,36 @@ jobs: make -j make valgrind + ubuntu-clang: + runs-on: ubuntu-22.04 + if: | + (github.event_name == 'pull_request') || + (github.event_name == 'push') || + (github.event_name == 'workflow_dispatch' || + (github.event_name == 'schedule' && github.repository == 'tezc/sc')) && !contains(github.event.inputs.skip, 'ubuntu') + name: Build on Ubuntu + + strategy: + fail-fast: false + matrix: + compiler: clang + steps: + - uses: actions/checkout@v2.1.0 + - name: build + env: + CC: ${{ matrix.compiler }} + run: | + sudo apt update + sudo apt-get install valgrind cmake + mkdir build-debug && cd build-debug + cmake .. -DSANITIZER=address + make -j + make check + rm -rf * + cmake .. -DSANITIZER=undefined + make -j + make check + ubuntu-gcc-thread: runs-on: ubuntu-latest if: | diff --git a/buffer/CMakeLists.txt b/buffer/CMakeLists.txt index f6ee328..86c0ab1 100644 --- a/buffer/CMakeLists.txt +++ b/buffer/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () diff --git a/heap/CMakeLists.txt b/heap/CMakeLists.txt index 5a38269..8b0d1fd 100644 --- a/heap/CMakeLists.txt +++ b/heap/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-misc-include-cleaner*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-misc-include-cleaner*,-bugprone-assignment-in-if-condition*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () diff --git a/ini/CMakeLists.txt b/ini/CMakeLists.txt index c7bbdbc..567f65f 100644 --- a/ini/CMakeLists.txt +++ b/ini/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () diff --git a/logger/sc_log.c b/logger/sc_log.c index 4630633..bd5da24 100644 --- a/logger/sc_log.c +++ b/logger/sc_log.c @@ -224,7 +224,8 @@ static int sc_strcasecmp(const char *a, const char *b) return 0; } - if ((n = tolower(*a) - tolower(*b)) != 0) { + n = tolower(*a) - tolower(*b); + if (n != 0) { return n; } } diff --git a/map/CMakeLists.txt b/map/CMakeLists.txt index 278714b..117a651 100644 --- a/map/CMakeLists.txt +++ b/map/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () diff --git a/mutex/CMakeLists.txt b/mutex/CMakeLists.txt index a4087f2..d87ac9c 100644 --- a/mutex/CMakeLists.txt +++ b/mutex/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-reserved-identifier*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-reserved-identifier*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () diff --git a/string/CMakeLists.txt b/string/CMakeLists.txt index 13724b2..12c0ae3 100644 --- a/string/CMakeLists.txt +++ b/string/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-misc-include-cleaner*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-misc-include-cleaner*,-bugprone-assignment-in-if-condition*,-bugprone-suspicious-realloc-usage*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () From d77ae17123910061222e7120eba7f1ca86a1f1bf Mon Sep 17 00:00:00 2001 From: Ozan Tezcan Date: Sat, 15 Feb 2025 11:50:19 +0300 Subject: [PATCH 09/15] Fix build --- .github/workflows/.ubuntu.yml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/.ubuntu.yml b/.github/workflows/.ubuntu.yml index 947f894..5f66aae 100644 --- a/.github/workflows/.ubuntu.yml +++ b/.github/workflows/.ubuntu.yml @@ -24,16 +24,11 @@ jobs: (github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'tezc/sc')) && !contains(github.event.inputs.skip, 'ubuntu') name: Build on Ubuntu - - strategy: - fail-fast: false - matrix: - compiler: gcc steps: - uses: actions/checkout@v2.1.0 - name: build env: - CC: ${{ matrix.compiler }} + CC: gcc run: | sudo apt update sudo apt-get install valgrind cmake @@ -58,16 +53,11 @@ jobs: (github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'tezc/sc')) && !contains(github.event.inputs.skip, 'ubuntu') name: Build on Ubuntu - - strategy: - fail-fast: false - matrix: - compiler: clang steps: - uses: actions/checkout@v2.1.0 - name: build env: - CC: ${{ matrix.compiler }} + CC: clang run: | sudo apt update sudo apt-get install valgrind cmake From 6a846a81752dfe5ec678f9e53ce6bec222320054 Mon Sep 17 00:00:00 2001 From: Ozan Tezcan Date: Sat, 15 Feb 2025 11:52:16 +0300 Subject: [PATCH 10/15] Fix build --- .github/workflows/.ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/.ubuntu.yml b/.github/workflows/.ubuntu.yml index 5f66aae..ebef0ea 100644 --- a/.github/workflows/.ubuntu.yml +++ b/.github/workflows/.ubuntu.yml @@ -165,7 +165,7 @@ jobs: sudo apt update sudo apt-get install cmake curl tar wine mkdir build-debug && cd build-debug - export ZIG=zig-linux-x86_64-0.12.0-dev.1834+f36ac227b + export ZIG=zig-linux-x86_64-0.14.0-dev.3222+8a3aebaee curl -o zig.tar.xz "https://ziglang.org/builds/$ZIG.tar.xz" tar -xf zig.tar.xz export CC="$(pwd)/$ZIG/zig cc -target x86_64-windows" From 6e6acc3ecd0c3cde533096716d88fc63fcb68f9c Mon Sep 17 00:00:00 2001 From: Ozan Tezcan Date: Sat, 15 Feb 2025 11:55:05 +0300 Subject: [PATCH 11/15] Fix build --- ini/CMakeLists.txt | 2 +- ini/sc_ini.c | 2 +- signal/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ini/CMakeLists.txt b/ini/CMakeLists.txt index 567f65f..64ed49d 100644 --- a/ini/CMakeLists.txt +++ b/ini/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-misc-include-cleaner*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-misc-include-cleaner*,-bugprone-assignment-in-if-condition*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () diff --git a/ini/sc_ini.c b/ini/sc_ini.c index 06eca38..c0901b7 100644 --- a/ini/sc_ini.c +++ b/ini/sc_ini.c @@ -191,5 +191,5 @@ int sc_ini_parse_file(void *arg, sc_ini_on_item cb, const char *filename) int sc_ini_parse_string(void *arg, sc_ini_on_item cb, const char *str) { char *ptr = (char *) str; - return sc_ini_parse(arg, cb, &ptr, string_line); + return sc_ini_parse(arg, cb, (void*) &ptr, string_line); } diff --git a/signal/CMakeLists.txt b/signal/CMakeLists.txt index 967a2a4..c4fd951 100644 --- a/signal/CMakeLists.txt +++ b/signal/CMakeLists.txt @@ -35,7 +35,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-reserved-identifier*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-reserved-identifier*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () From 268aced58ca44b609f77c738e3f2fbdf870cf1db Mon Sep 17 00:00:00 2001 From: Ozan Tezcan Date: Sat, 15 Feb 2025 12:01:28 +0300 Subject: [PATCH 12/15] Fix build --- crc32/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crc32/CMakeLists.txt b/crc32/CMakeLists.txt index aea88a6..0cd4620 100644 --- a/crc32/CMakeLists.txt +++ b/crc32/CMakeLists.txt @@ -32,7 +32,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-implicit-widening-of-multiplication-result*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-implicit-widening-of-multiplication-result*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () From 5147b0859e64c298346c7e0edd68ed70a979119d Mon Sep 17 00:00:00 2001 From: Ozan Tezcan Date: Sat, 15 Feb 2025 12:05:46 +0300 Subject: [PATCH 13/15] Fix build --- uri/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uri/CMakeLists.txt b/uri/CMakeLists.txt index b521e7d..b1e7da8 100644 --- a/uri/CMakeLists.txt +++ b/uri/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*, -misc-include-cleaner*, -bugprone-assignment-in-if-condition*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () From 6f1839e8290fbd5e3303a0629066d9b0e73fd665 Mon Sep 17 00:00:00 2001 From: Ozan Tezcan Date: Sat, 15 Feb 2025 12:09:08 +0300 Subject: [PATCH 14/15] Fix build --- linked-list/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linked-list/CMakeLists.txt b/linked-list/CMakeLists.txt index 5b2ed7e..9c0880d 100644 --- a/linked-list/CMakeLists.txt +++ b/linked-list/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () From 3a937cef5e859b1083890d787c99fea519ef71c6 Mon Sep 17 00:00:00 2001 From: Ozan Tezcan Date: Sat, 15 Feb 2025 12:11:54 +0300 Subject: [PATCH 15/15] Fix build --- timer/CMakeLists.txt | 2 +- uri/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/timer/CMakeLists.txt b/timer/CMakeLists.txt index 1f34b8a..bcf90cd 100644 --- a/timer/CMakeLists.txt +++ b/timer/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-bugprone-implicit-widening-of-multiplication-result*, -misc-include-cleaner*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-bugprone-implicit-widening-of-multiplication-result*,-misc-include-cleaner*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif () diff --git a/uri/CMakeLists.txt b/uri/CMakeLists.txt index b1e7da8..438c74d 100644 --- a/uri/CMakeLists.txt +++ b/uri/CMakeLists.txt @@ -31,7 +31,7 @@ if (SC_BUILD_TEST) set(CMAKE_C_CLANG_TIDY clang-tidy; -line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}]; - -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*, -misc-include-cleaner*, -bugprone-assignment-in-if-condition*; + -checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-misc-include-cleaner*,-bugprone-assignment-in-if-condition*; -warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;) endif ()