diff --git a/.github/workflows/ci_action.yml b/.github/workflows/ci_action.yml index f1017d8..ca56bea 100644 --- a/.github/workflows/ci_action.yml +++ b/.github/workflows/ci_action.yml @@ -61,7 +61,7 @@ jobs: echo "== CMAKE VERSION ==" cmake --version echo "== CMAKE CONFIGURE ==" - cmake -B${{env.BUILD_DIR}} -DCLOVE_CMAKE__UC_BUILD=ON + cmake -B${{env.BUILD_DIR}} -DCLOVE_CMAKE__UC_BUILD=ON -DCLOVE_CMAKE__CPP_STRICT_WARN_AS_ERROR=ON echo "== CMAKE BUILD ==" cmake --build ${{env.BUILD_DIR}} --config Release - name: List Build diff --git a/clove-unit.h b/clove-unit.h index dd01157..0181d92 100644 --- a/clove-unit.h +++ b/clove-unit.h @@ -1001,8 +1001,9 @@ char* __clove_path_to_absolute(const char* rel_path) { char* result = NULL; #if _WIN32 result = __CLOVE_MEMORY_MALLOC_TYPE_N(char, _MAX_PATH); - //if( _fullpath( full, partialPath, _MAX_PATH ) != NULL ) - _fullpath(result, rel_path, _MAX_PATH ); + + char* discarded = _fullpath(result, rel_path, _MAX_PATH ); + __CLOVE_UNUSED_VAR(discarded); //fix "warning C6031: Return value ignored: '_fullpath'." #else result = __CLOVE_MEMORY_MALLOC_TYPE_N(char, PATH_MAX); if (__clove_path_exists(rel_path)) { diff --git a/tests/stricts/clove-c/CMakeLists.txt b/tests/stricts/clove-c/CMakeLists.txt index eca4e41..0783e34 100644 --- a/tests/stricts/clove-c/CMakeLists.txt +++ b/tests/stricts/clove-c/CMakeLists.txt @@ -11,7 +11,7 @@ set_property(TARGET StrictCloveC PROPERTY COMPILE_WARNING_AS_ERROR ON) # Compiler Options if (MSVC) - target_compile_options(StrictCloveC PRIVATE /W4) + target_compile_options(StrictCloveC PRIVATE /W4 /analyze) else() # GCC and CLANG target_compile_options(StrictCloveC PRIVATE -Wall -Wextra -Wpedantic) endif() diff --git a/tests/stricts/clove-cpp/CMakeLists.txt b/tests/stricts/clove-cpp/CMakeLists.txt index c87c77f..aea1252 100644 --- a/tests/stricts/clove-cpp/CMakeLists.txt +++ b/tests/stricts/clove-cpp/CMakeLists.txt @@ -13,7 +13,7 @@ endif() # Compiler Options if (MSVC) - target_compile_options(StrictCloveCpp PRIVATE /W4) + target_compile_options(StrictCloveCpp PRIVATE /W4 /analyze) else() # GCC and CLANG target_compile_options(StrictCloveCpp PRIVATE -Wall -Wextra -Wpedantic) endif()