From 051d6a553efa0dd1a9888f0c741bb1a095e04497 Mon Sep 17 00:00:00 2001 From: "Shane F. Carr" Date: Tue, 10 Sep 2019 04:14:43 +0000 Subject: [PATCH] ICU-20453 Add more warning types to CI build. See #824 --- .ci-builds/.azure-pipelines.yml | 6 +++--- icu4c/source/test/intltest/strtest.cpp | 6 +++--- icu4c/source/test/intltest/strtest.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.ci-builds/.azure-pipelines.yml b/.ci-builds/.azure-pipelines.yml index 16548aa64d4..ed13185c09e 100644 --- a/.ci-builds/.azure-pipelines.yml +++ b/.ci-builds/.azure-pipelines.yml @@ -44,7 +44,7 @@ jobs: vmImage: 'Ubuntu 16.04' steps: - script: | - export CPPFLAGS="-Werror -Wall -Wextra -Wextra-semi" && cd icu4c/source && ./runConfigureICU Linux && make -j2 tests + export CPPFLAGS="-Werror -Wall -Wextra -Wextra-semi -Wundef -Wnon-virtual-dtor" && cd icu4c/source && ./runConfigureICU Linux && make -j2 tests displayName: 'Build only (WarningsAsErrors)' env: CC: clang @@ -276,8 +276,8 @@ jobs: vmImage: 'macOS-10.14' steps: - script: | - export CPPFLAGS="-Werror -Wall -Wextra -Wextra-semi" && cd icu4c/source && ./runConfigureICU MacOSX && make -j2 tests + export CPPFLAGS="-Werror -Wall -Wextra -Wextra-semi -Wundef -Wnon-virtual-dtor" && cd icu4c/source && ./runConfigureICU MacOSX && make -j2 tests displayName: 'Build only (WarningsAsErrors)' env: CC: clang - CXX: clang++ \ No newline at end of file + CXX: clang++ diff --git a/icu4c/source/test/intltest/strtest.cpp b/icu4c/source/test/intltest/strtest.cpp index 79a3d01697f..7bb9662c36c 100644 --- a/icu4c/source/test/intltest/strtest.cpp +++ b/icu4c/source/test/intltest/strtest.cpp @@ -14,7 +14,7 @@ * created by: Markus W. Scherer */ -#if U_HAVE_STRING_VIEW +#ifdef U_HAVE_STRING_VIEW #include #endif @@ -244,7 +244,7 @@ void StringTest::runIndexedTest(int32_t index, UBool exec, const char *&name, ch TESTCASE_AUTO(TestStringPiece); TESTCASE_AUTO(TestStringPieceComparisons); TESTCASE_AUTO(TestStringPieceOther); -#if U_HAVE_STRING_VIEW +#ifdef U_HAVE_STRING_VIEW TESTCASE_AUTO(TestStringPieceStringView); #endif TESTCASE_AUTO(TestByteSink); @@ -433,7 +433,7 @@ StringTest::TestStringPieceOther() { assertEquals("data()", piece.data(), other.data()); } -#if U_HAVE_STRING_VIEW +#ifdef U_HAVE_STRING_VIEW void StringTest::TestStringPieceStringView() { static constexpr char msg[] = "Kapow!"; diff --git a/icu4c/source/test/intltest/strtest.h b/icu4c/source/test/intltest/strtest.h index e620c8a9360..040c0b0e3c9 100644 --- a/icu4c/source/test/intltest/strtest.h +++ b/icu4c/source/test/intltest/strtest.h @@ -45,7 +45,7 @@ private: void TestStringPiece(); void TestStringPieceComparisons(); void TestStringPieceOther(); -#if U_HAVE_STRING_VIEW +#ifdef U_HAVE_STRING_VIEW void TestStringPieceStringView(); #endif void TestByteSink(); -- 2.40.0