From 1476d29fab361f13d903c303ff6ac03dc94cf9b6 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 27 Nov 2023 12:35:41 +0100 Subject: [PATCH 01/22] add -Werror to Makefile and CMakeLists.txt --- CMakeLists.txt | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 435773d7bc..5de3ccfc5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,7 +60,7 @@ if(UNIX) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffp-contract=off") # disable floating point operation contraction set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wcast-qual -Wall -W -Wextra -Wno-long-long") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Wno-unused-parameter") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wno-unused-parameter") # CLANG if(CLANG) find_program(clangBin NAMES /home/amm-archiv/soft/Linux/clang/current/bin/clang clang REQUIRED) diff --git a/Makefile b/Makefile index 811d38b684..ef96060357 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,7 @@ endif # C compiler flags CFLAGS += -std=c99 -pedantic -Wcast-qual -Wall -W -Wextra -Wno-long-long \ -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ - -Werror-implicit-function-declaration \ + -Werror \ -Wno-implicit-fallthrough -ffp-contract=off # libs to link -- GitLab From ae6c8a3830754e07a2920d5daf17d72f78c35bb8 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Mon, 27 Nov 2023 12:43:53 +0100 Subject: [PATCH 02/22] treat warnings as errors in VS project files --- Workspace_msvc/decoder.vcxproj | 2 ++ Workspace_msvc/encoder.vcxproj | 2 ++ Workspace_msvc/lib_com.vcxproj | 2 ++ Workspace_msvc/lib_debug.vcxproj | 2 ++ Workspace_msvc/lib_dec.vcxproj | 4 +++- Workspace_msvc/lib_enc.vcxproj | 4 +++- Workspace_msvc/lib_lc3plus.vcxproj | 2 ++ Workspace_msvc/lib_rend.vcxproj | 2 ++ Workspace_msvc/lib_util.vcxproj | 2 ++ Workspace_msvc/renderer.vcxproj | 2 ++ 10 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Workspace_msvc/decoder.vcxproj b/Workspace_msvc/decoder.vcxproj index e59992847c..13e94e8533 100644 --- a/Workspace_msvc/decoder.vcxproj +++ b/Workspace_msvc/decoder.vcxproj @@ -82,6 +82,7 @@ OldStyle Default %(DisableSpecificWarnings) + true _DEBUG;%(PreprocessorDefinitions) @@ -129,6 +130,7 @@ Default %(DisableSpecificWarnings) + true NDEBUG;%(PreprocessorDefinitions) diff --git a/Workspace_msvc/encoder.vcxproj b/Workspace_msvc/encoder.vcxproj index 9578e488dc..0808df5636 100644 --- a/Workspace_msvc/encoder.vcxproj +++ b/Workspace_msvc/encoder.vcxproj @@ -82,6 +82,7 @@ OldStyle Default %(DisableSpecificWarnings) + true _DEBUG;%(PreprocessorDefinitions) @@ -137,6 +138,7 @@ Default %(DisableSpecificWarnings) + true NDEBUG;%(PreprocessorDefinitions) diff --git a/Workspace_msvc/lib_com.vcxproj b/Workspace_msvc/lib_com.vcxproj index cdf577df2f..92bbedba8e 100644 --- a/Workspace_msvc/lib_com.vcxproj +++ b/Workspace_msvc/lib_com.vcxproj @@ -72,6 +72,7 @@ OldStyle Default %(DisableSpecificWarnings) + true _DEBUG;%(PreprocessorDefinitions) @@ -109,6 +110,7 @@ Default %(DisableSpecificWarnings) + true NDEBUG;%(PreprocessorDefinitions) diff --git a/Workspace_msvc/lib_debug.vcxproj b/Workspace_msvc/lib_debug.vcxproj index 4f3b1aa297..266fca4507 100644 --- a/Workspace_msvc/lib_debug.vcxproj +++ b/Workspace_msvc/lib_debug.vcxproj @@ -68,6 +68,7 @@ OldStyle Default %(DisableSpecificWarnings) + true $(OutDir)$(TargetName).lib @@ -94,6 +95,7 @@ Default %(DisableSpecificWarnings) + true $(OutDir)$(TargetName).lib diff --git a/Workspace_msvc/lib_dec.vcxproj b/Workspace_msvc/lib_dec.vcxproj index 662502a1a6..90f7ce7e69 100644 --- a/Workspace_msvc/lib_dec.vcxproj +++ b/Workspace_msvc/lib_dec.vcxproj @@ -82,6 +82,7 @@ OldStyle Default %(DisableSpecificWarnings) + true _DEBUG;%(PreprocessorDefinitions) @@ -124,6 +125,7 @@ Default %(DisableSpecificWarnings) + true NDEBUG;%(PreprocessorDefinitions) @@ -346,4 +348,4 @@ - + \ No newline at end of file diff --git a/Workspace_msvc/lib_enc.vcxproj b/Workspace_msvc/lib_enc.vcxproj index 6ef1fcabe1..9763a0c49d 100644 --- a/Workspace_msvc/lib_enc.vcxproj +++ b/Workspace_msvc/lib_enc.vcxproj @@ -82,6 +82,7 @@ OldStyle Default %(DisableSpecificWarnings) + true _DEBUG;%(PreprocessorDefinitions) @@ -128,6 +129,7 @@ Default %(DisableSpecificWarnings) + true NDEBUG;%(PreprocessorDefinitions) @@ -362,4 +364,4 @@ - + \ No newline at end of file diff --git a/Workspace_msvc/lib_lc3plus.vcxproj b/Workspace_msvc/lib_lc3plus.vcxproj index 207b6903c8..bb6b4d3c7d 100644 --- a/Workspace_msvc/lib_lc3plus.vcxproj +++ b/Workspace_msvc/lib_lc3plus.vcxproj @@ -72,6 +72,7 @@ 4305;4244;4996 OldStyle false + true Console @@ -90,6 +91,7 @@ true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 4244;4305;4996 + true Console diff --git a/Workspace_msvc/lib_rend.vcxproj b/Workspace_msvc/lib_rend.vcxproj index f248ab541a..d0e0d4053f 100644 --- a/Workspace_msvc/lib_rend.vcxproj +++ b/Workspace_msvc/lib_rend.vcxproj @@ -82,6 +82,7 @@ OldStyle Default %(DisableSpecificWarnings) + true _DEBUG;%(PreprocessorDefinitions) @@ -124,6 +125,7 @@ Default %(DisableSpecificWarnings) + true NDEBUG;%(PreprocessorDefinitions) diff --git a/Workspace_msvc/lib_util.vcxproj b/Workspace_msvc/lib_util.vcxproj index 4b787f1d0c..de26f33a6d 100644 --- a/Workspace_msvc/lib_util.vcxproj +++ b/Workspace_msvc/lib_util.vcxproj @@ -67,6 +67,7 @@ OldStyle Default %(DisableSpecificWarnings) + true $(OutDir)$(TargetName).lib @@ -90,6 +91,7 @@ Default %(DisableSpecificWarnings) + true $(OutDir)$(TargetName).lib diff --git a/Workspace_msvc/renderer.vcxproj b/Workspace_msvc/renderer.vcxproj index bf4a162d19..2bae53b431 100644 --- a/Workspace_msvc/renderer.vcxproj +++ b/Workspace_msvc/renderer.vcxproj @@ -79,6 +79,7 @@ OldStyle Default %(DisableSpecificWarnings) + true _DEBUG;%(PreprocessorDefinitions) @@ -126,6 +127,7 @@ Default %(DisableSpecificWarnings) + true NDEBUG;%(PreprocessorDefinitions) -- GitLab From 9568ca0ea3ae5b8dbe558978956a9449b8dbf197 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 27 Nov 2023 12:49:39 +0100 Subject: [PATCH 03/22] remove ci/check_for_warnigns.py --- .gitlab-ci.yml | 22 -------------- ci/check_for_warnings.py | 62 ---------------------------------------- 2 files changed, 84 deletions(-) delete mode 100755 ci/check_for_warnings.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9755bf3057..4c5c8e4054 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -309,8 +309,6 @@ build-codec-linux-make: script: - *print-common-info - make -j 2>&1 | tee $BUILD_OUTPUT - # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...< - - ci/check_for_warnings.py $BUILD_OUTPUT || exit $? build-codec-linux-cmake: extends: @@ -323,8 +321,6 @@ build-codec-linux-cmake: - cmake .. - cd .. - make -C build -j 2>&1 | tee $BUILD_OUTPUT - # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...< - - ci/check_for_warnings.py $BUILD_OUTPUT || exit $? build-codec-instrumented-linux: extends: @@ -343,8 +339,6 @@ build-codec-sanitizers-linux: script: - *print-common-info - bash ci/build_codec_sanitizers_linux.sh - # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...< - - ci/check_for_warnings.py $BUILD_OUTPUT || exit $? build-codec-include-split-linux-make: extends: @@ -353,8 +347,6 @@ build-codec-include-split-linux-make: script: - *print-common-info - make -j INCLUDE_SPLIT=1 2>&1 | tee $BUILD_OUTPUT - # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...< - - ci/check_for_warnings.py $BUILD_OUTPUT || exit $? build-codec-include-split-linux-cmake: extends: @@ -367,8 +359,6 @@ build-codec-include-split-linux-cmake: - cmake .. -DINCLUDE_SPLIT=1 - cd .. - make -C build -j 2>&1 | tee $BUILD_OUTPUT - # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...< - - ci/check_for_warnings.py $BUILD_OUTPUT || exit $? build-codec-windows-cmake: extends: @@ -379,9 +369,6 @@ build-codec-windows-cmake: - $winoutdata = $null - cmake -G "Visual Studio 15 2017" . -Bbuild - cmake --build build -j | tee -variable winoutdata - - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression - - ("exit $LASTEXITCODE") | Invoke-Expression build-codec-windows-include-split-cmake: extends: @@ -392,9 +379,6 @@ build-codec-windows-include-split-cmake: - $winoutdata = $null - cmake -DINCLUDE_SPLIT=1 -G "Visual Studio 15 2017" . -Bbuild - cmake --build build -j | tee -variable winoutdata - - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression - - ("exit $LASTEXITCODE") | Invoke-Expression build-codec-windows-msbuild: extends: @@ -405,9 +389,6 @@ build-codec-windows-msbuild: - $winoutdata = $null - py .\scripts\strip_split_rendering.py - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug | tee -variable winoutdata - - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression - - ("exit $LASTEXITCODE") | Invoke-Expression # --------------------------------------------------------------- # Test jobs for merge requests @@ -1181,9 +1162,6 @@ test-be-to-release: - echo "$CI_COMMIT_BRANCH" - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug /p:Platform=win32 /m | tee -variable winoutdata - - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression - - ("exit $LASTEXITCODE") | Invoke-Expression # path to release candidate refs defined in config.toml diff --git a/ci/check_for_warnings.py b/ci/check_for_warnings.py deleted file mode 100755 index f6b205e689..0000000000 --- a/ci/check_for_warnings.py +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env python3 -""" - (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository. All Rights Reserved. - - This software is protected by copyright law and by international treaties. - The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository retain full ownership rights in their respective contributions in - the software. This notice grants no license of any kind, including but not limited to patent - license, nor is any license granted by implication, estoppel or otherwise. - - Contributors are required to enter into the IVAS codec Public Collaboration agreement before making - contributions. - - This software is provided "AS IS", without any express or implied warranties. The software is in the - development stage. It is intended exclusively for experts who have experience with such software and - solely for the purpose of inspection. All implied warranties of non-infringement, merchantability - and fitness for a particular purpose are hereby disclaimed and excluded. - - Any dispute, controversy or claim arising under or in relation to providing this software shall be - submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in - accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and - the United Nations Convention on Contracts on the International Sales of Goods. -""" -import argparse -import sys - - -SEARCH_FOR = "warning" -RETURN_FOUND = 123 - - -def main(log_file): - with open(log_file) as f: - lines_with_warnings = [l for l in f.readlines() if SEARCH_FOR in l] - - n_warnings = len(lines_with_warnings) - if n_warnings > 0: - print(f"========== Found {n_warnings} warnings: =========") - for l in lines_with_warnings: - print(l) - return RETURN_FOUND - else: - return 0 - - -if __name__ == "__main__": - parser = argparse.ArgumentParser() - parser.add_argument( - "compilation-output", - type=str, - help="text output of compilation process to analyze", - ) - args = vars(parser.parse_args()) - ret_code = main(args[ "compilation-output" ]) - sys.exit(ret_code) -- GitLab From d441d8db245d9a9beb7436acc89364c7279a4736 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 27 Nov 2023 12:51:17 +0100 Subject: [PATCH 04/22] introduce build warning to test jobs --- lib_enc/ivas_enc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_enc/ivas_enc.c b/lib_enc/ivas_enc.c index c52a722c20..0201706063 100644 --- a/lib_enc/ivas_enc.c +++ b/lib_enc/ivas_enc.c @@ -64,6 +64,7 @@ ivas_error ivas_enc( float *data_f[MAX_INPUT_CHANNELS + MAX_NUM_OBJECTS]; int32_t ivas_total_brate; ivas_error error; + int16_t unused_var; error = IVAS_ERR_OK; push_wmops( "ivas_enc" ); -- GitLab From 29cbb7b494e754b604fa6b74ac0c01d9addc199e Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 27 Nov 2023 14:13:16 +0100 Subject: [PATCH 05/22] make build script fail on build fail --- ci/build_codec_sanitizers_linux.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/build_codec_sanitizers_linux.sh b/ci/build_codec_sanitizers_linux.sh index 4e40f89b9a..d352fa32ec 100755 --- a/ci/build_codec_sanitizers_linux.sh +++ b/ci/build_codec_sanitizers_linux.sh @@ -40,5 +40,4 @@ make CLANG=1 -j make clean make CLANG=2 -j make clean -# write out one build for warnings check -make CLANG=3 -j 2>&1 | tee build_output.txt +make CLANG=3 -j -- GitLab From 2d514a34128c65d80bcaff48f857643b0c33457c Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 27 Nov 2023 14:27:07 +0100 Subject: [PATCH 06/22] treat warnings as errors in windows cmake builds too --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5de3ccfc5a..89fde3147b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,7 +113,7 @@ elseif(WIN32) /MP ) # CMake sets /W3 by default, until CMake version 3.15. Instead of setting /W4 separately, replace in existing settings - string(REGEX REPLACE "/W3" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + string(REGEX REPLACE "/W3" "/W4 /WX" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") endif() # configuration options for all platforms -- GitLab From aff8e7e7076ffefaadc439f668261b0c2be80d10 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 27 Nov 2023 14:32:32 +0100 Subject: [PATCH 07/22] cleanup build tool calls --- .gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4c5c8e4054..0ec829ae3b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -308,7 +308,7 @@ build-codec-linux-make: - .rules-basis script: - *print-common-info - - make -j 2>&1 | tee $BUILD_OUTPUT + - make -j build-codec-linux-cmake: extends: @@ -320,7 +320,7 @@ build-codec-linux-cmake: - cd build - cmake .. - cd .. - - make -C build -j 2>&1 | tee $BUILD_OUTPUT + - make -C build -j build-codec-instrumented-linux: extends: @@ -346,7 +346,7 @@ build-codec-include-split-linux-make: - .rules-basis script: - *print-common-info - - make -j INCLUDE_SPLIT=1 2>&1 | tee $BUILD_OUTPUT + - make -j INCLUDE_SPLIT=1 build-codec-include-split-linux-cmake: extends: @@ -358,7 +358,7 @@ build-codec-include-split-linux-cmake: - cd build - cmake .. -DINCLUDE_SPLIT=1 - cd .. - - make -C build -j 2>&1 | tee $BUILD_OUTPUT + - make -C build -j build-codec-windows-cmake: extends: @@ -368,7 +368,7 @@ build-codec-windows-cmake: - *print-common-info-windows - $winoutdata = $null - cmake -G "Visual Studio 15 2017" . -Bbuild - - cmake --build build -j | tee -variable winoutdata + - cmake --build build -j build-codec-windows-include-split-cmake: extends: @@ -378,7 +378,7 @@ build-codec-windows-include-split-cmake: - *print-common-info-windows - $winoutdata = $null - cmake -DINCLUDE_SPLIT=1 -G "Visual Studio 15 2017" . -Bbuild - - cmake --build build -j | tee -variable winoutdata + - cmake --build build -j build-codec-windows-msbuild: extends: -- GitLab From f04d0fc6c7cf66385f22717b706be50ae0add0ca Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 27 Nov 2023 14:33:18 +0100 Subject: [PATCH 08/22] add another unused var for debugging --- lib_enc/ivas_mdct_core_enc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_enc/ivas_mdct_core_enc.c b/lib_enc/ivas_mdct_core_enc.c index f37eeb4351..a12d14704e 100644 --- a/lib_enc/ivas_mdct_core_enc.c +++ b/lib_enc/ivas_mdct_core_enc.c @@ -70,6 +70,7 @@ static void enc_prm_pre_mdct( ) { int16_t nbits_start; + int16_t another_unused_var; #ifdef DEBUG_PLOT_BITS int16_t tmp; #endif -- GitLab From 995b3b4869c87eccda5f48d6ee507400a17b7252 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 27 Nov 2023 14:40:22 +0100 Subject: [PATCH 09/22] set /WX for compiler and linker --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 89fde3147b..8b97b52855 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,7 +113,9 @@ elseif(WIN32) /MP ) # CMake sets /W3 by default, until CMake version 3.15. Instead of setting /W4 separately, replace in existing settings - string(REGEX REPLACE "/W3" "/W4 /WX" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + string(REGEX REPLACE "/W3" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /WX") endif() # configuration options for all platforms -- GitLab From e51380780d76366426510dfd3c3cd493e75009c0 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 27 Nov 2023 14:57:27 +0100 Subject: [PATCH 10/22] add debug printout --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b97b52855..5654a10c95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,6 +116,8 @@ elseif(WIN32) string(REGEX REPLACE "/W3" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /WX") + message(STATUS, "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") + message(STATUS, "CMAKE_EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}") endif() # configuration options for all platforms -- GitLab From d5957753283b91f9b7cd85383419050c6c3de289 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 27 Nov 2023 15:00:03 +0100 Subject: [PATCH 11/22] add more debug output --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5654a10c95..e1d61710eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,6 +113,8 @@ elseif(WIN32) /MP ) # CMake sets /W3 by default, until CMake version 3.15. Instead of setting /W4 separately, replace in existing settings + message(STATUS, "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") + message(STATUS, "CMAKE_EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}") string(REGEX REPLACE "/W3" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /WX") -- GitLab From bb4390ca47be6c2935f084911cfd52d715cf4404 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 27 Nov 2023 15:08:11 +0100 Subject: [PATCH 12/22] use add_compile_options for MSVC --- CMakeLists.txt | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e1d61710eb..d3b3188e79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,14 +112,7 @@ elseif(WIN32) -D_CRT_SECURE_NO_WARNINGS /MP ) - # CMake sets /W3 by default, until CMake version 3.15. Instead of setting /W4 separately, replace in existing settings - message(STATUS, "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") - message(STATUS, "CMAKE_EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}") - string(REGEX REPLACE "/W3" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /WX") - message(STATUS, "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") - message(STATUS, "CMAKE_EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}") + add_compile_options("/W4" "WX") endif() # configuration options for all platforms -- GitLab From 3fb48585566949f573d0988afedfb8e8f5c5f48c Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 27 Nov 2023 15:10:31 +0100 Subject: [PATCH 13/22] fix typo --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d3b3188e79..e3a34d9e9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,7 +112,7 @@ elseif(WIN32) -D_CRT_SECURE_NO_WARNINGS /MP ) - add_compile_options("/W4" "WX") + add_compile_options("/W4" "/WX") endif() # configuration options for all platforms -- GitLab From 9736e60bb3f4daa52767130dc0d0fdc796fde739 Mon Sep 17 00:00:00 2001 From: knj Date: Thu, 30 Nov 2023 13:38:41 +0100 Subject: [PATCH 14/22] Revert "add another unused var for debugging" This reverts commit f04d0fc6c7cf66385f22717b706be50ae0add0ca. --- lib_enc/ivas_mdct_core_enc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_enc/ivas_mdct_core_enc.c b/lib_enc/ivas_mdct_core_enc.c index a12d14704e..f37eeb4351 100644 --- a/lib_enc/ivas_mdct_core_enc.c +++ b/lib_enc/ivas_mdct_core_enc.c @@ -70,7 +70,6 @@ static void enc_prm_pre_mdct( ) { int16_t nbits_start; - int16_t another_unused_var; #ifdef DEBUG_PLOT_BITS int16_t tmp; #endif -- GitLab From 58b3d250d75201b9a36d690c7738e4dd3e51a3d0 Mon Sep 17 00:00:00 2001 From: knj Date: Thu, 30 Nov 2023 13:38:58 +0100 Subject: [PATCH 15/22] Revert "introduce build warning to test jobs" This reverts commit d441d8db245d9a9beb7436acc89364c7279a4736. --- lib_enc/ivas_enc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_enc/ivas_enc.c b/lib_enc/ivas_enc.c index 0201706063..c52a722c20 100644 --- a/lib_enc/ivas_enc.c +++ b/lib_enc/ivas_enc.c @@ -64,7 +64,6 @@ ivas_error ivas_enc( float *data_f[MAX_INPUT_CHANNELS + MAX_NUM_OBJECTS]; int32_t ivas_total_brate; ivas_error error; - int16_t unused_var; error = IVAS_ERR_OK; push_wmops( "ivas_enc" ); -- GitLab From 857ff87828b39f912d7c0024e468bc4040c20030 Mon Sep 17 00:00:00 2001 From: knj Date: Thu, 30 Nov 2023 13:53:49 +0100 Subject: [PATCH 16/22] fix forgotten warning under SPLIT_REND_WITH_HEAD_ROT --- lib_dec/lib_dec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index b1ac64db2d..4e0e85e7a5 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -3954,6 +3954,8 @@ static ivas_error set_pcm_buffer_to_zero( { ivas_error error; + error = IVAS_ERR_OK; + switch ( pcmType ) { case IVAS_DEC_PCM_FLOAT: @@ -3966,7 +3968,7 @@ static ivas_error set_pcm_buffer_to_zero( error = IVAS_ERR_INTERNAL; } - return IVAS_ERR_OK; + return error; } -- GitLab From a89811328e7423de38b659e7bde4bb58d300fe0f Mon Sep 17 00:00:00 2001 From: knj Date: Thu, 30 Nov 2023 13:59:07 +0100 Subject: [PATCH 17/22] Revert "fix forgotten warning under SPLIT_REND_WITH_HEAD_ROT" This reverts commit 857ff87828b39f912d7c0024e468bc4040c20030. --- lib_dec/lib_dec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 4e0e85e7a5..b1ac64db2d 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -3954,8 +3954,6 @@ static ivas_error set_pcm_buffer_to_zero( { ivas_error error; - error = IVAS_ERR_OK; - switch ( pcmType ) { case IVAS_DEC_PCM_FLOAT: @@ -3968,7 +3966,7 @@ static ivas_error set_pcm_buffer_to_zero( error = IVAS_ERR_INTERNAL; } - return error; + return IVAS_ERR_OK; } -- GitLab From 806dc0cadbac78febb07b9b7f836c88ea2642cc5 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 11 Dec 2023 14:00:49 +0100 Subject: [PATCH 18/22] keep warning level in windows CMake build --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 98ea2b0254..24149c5714 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,7 +112,7 @@ elseif(WIN32) -D_CRT_SECURE_NO_WARNINGS /MP ) - add_compile_options("/W4" "/WX") + add_compile_options("/WX") endif() # configuration options for all platforms -- GitLab From b08328c7b88c8f5c1516f53f748d89cda9dfe868 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 11 Dec 2023 14:04:37 +0100 Subject: [PATCH 19/22] comment out WX for debugging --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 24149c5714..b64a3b5232 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,7 +112,7 @@ elseif(WIN32) -D_CRT_SECURE_NO_WARNINGS /MP ) - add_compile_options("/WX") + # add_compile_options("/WX") endif() # configuration options for all platforms -- GitLab From f1e0630c194c2feb83ecf98b7b1ec607cace85c1 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 11 Dec 2023 14:08:03 +0100 Subject: [PATCH 20/22] add old stuff back for debugging --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b64a3b5232..5361ce34ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,6 +112,7 @@ elseif(WIN32) -D_CRT_SECURE_NO_WARNINGS /MP ) + string(REGEX REPLACE "/W3" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") # add_compile_options("/WX") endif() -- GitLab From 8dba27829f91026d801a5ce3a992871775adfe95 Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 11 Dec 2023 14:11:55 +0100 Subject: [PATCH 21/22] only add WX in non-split-rendering builds --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5361ce34ee..aaab426743 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,8 +112,9 @@ elseif(WIN32) -D_CRT_SECURE_NO_WARNINGS /MP ) - string(REGEX REPLACE "/W3" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - # add_compile_options("/WX") + if(NOT INCLUDE_SPLIT) + add_compile_options("/W4 /WX") + endif() endif() # configuration options for all platforms -- GitLab From ae46d8c295c71199d9110ea277a828c0b928ebeb Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 11 Dec 2023 14:15:28 +0100 Subject: [PATCH 22/22] fix missing "" --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aaab426743..7d8b2caeb0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,7 +113,7 @@ elseif(WIN32) /MP ) if(NOT INCLUDE_SPLIT) - add_compile_options("/W4 /WX") + add_compile_options("/W4" "/WX") endif() endif() -- GitLab