From 2b4e650fe9b5f89d8829b0508aafa3378d4a3244 Mon Sep 17 00:00:00 2001 From: Vicente Adolfo Bolea Sanchez Date: Mon, 21 Jun 2021 14:35:25 -0400 Subject: [PATCH] fixup! fixup! CI: Enforce -Wall and -Werror Signed-off-by: Vicente Adolfo Bolea Sanchez --- .../bp/operations/TestBPWriteReadSzComplex.cpp | 2 +- .../bp/operations/TestBPWriteReadZfpComplex.cpp | 2 +- testing/install/CMakeLists.txt | 13 +++++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/testing/adios2/engine/bp/operations/TestBPWriteReadSzComplex.cpp b/testing/adios2/engine/bp/operations/TestBPWriteReadSzComplex.cpp index 6ef77aeaa3..49944ff309 100644 --- a/testing/adios2/engine/bp/operations/TestBPWriteReadSzComplex.cpp +++ b/testing/adios2/engine/bp/operations/TestBPWriteReadSzComplex.cpp @@ -179,7 +179,7 @@ void Writer(const Dims &shape, const Dims &start, const Dims &count, bpDComplexes.AddOperation(compressor, {{"accuracy", accuracy}}); io.DefineAttribute("AttInt", 110); adios2::Engine writerEngine = io.Open(fileName, adios2::Mode::Write); - for (int i = 0; i < steps; ++i) + for (int i = 0; i < static_cast(steps); ++i) { writerEngine.BeginStep(); GenData(myChars, i, start, count, shape); diff --git a/testing/adios2/engine/bp/operations/TestBPWriteReadZfpComplex.cpp b/testing/adios2/engine/bp/operations/TestBPWriteReadZfpComplex.cpp index 930a6a3e81..ffb1aad7c7 100644 --- a/testing/adios2/engine/bp/operations/TestBPWriteReadZfpComplex.cpp +++ b/testing/adios2/engine/bp/operations/TestBPWriteReadZfpComplex.cpp @@ -179,7 +179,7 @@ void Writer(const Dims &shape, const Dims &start, const Dims &count, bpDComplexes.AddOperation(zfpOp, {{"accuracy", accuracy}}); io.DefineAttribute("AttInt", 110); adios2::Engine writerEngine = io.Open(fileName, adios2::Mode::Write); - for (int i = 0; i < steps; ++i) + for (int i = 0; i < static_cast(steps); ++i) { writerEngine.BeginStep(); GenData(myChars, i, start, count, shape); diff --git a/testing/install/CMakeLists.txt b/testing/install/CMakeLists.txt index 2cf5db194e..cd8481d942 100644 --- a/testing/install/CMakeLists.txt +++ b/testing/install/CMakeLists.txt @@ -83,10 +83,15 @@ set_tests_properties(Install.Setup PROPERTIES ) # Remove -Wall -Werror in this scope -string(REPLACE "-Wall" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) -string(REPLACE "-Wall" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) -string(REPLACE "-Werror" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) -string(REPLACE "-Werror" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +if(CMAKE_C_FLAGS) + string(REPLACE "-Wall" " " CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) + string(REPLACE "-Werror" " " CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) +endif() + +if(CMAKE_CXX_FLAGS) + string(REPLACE "-Wall" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + string(REPLACE "-Werror" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +endif() add_install_cmake_test(C) add_install_cmake_test(CXX11)