]> granicus.if.org Git - icu/commitdiff
ICU-20453 Add more warning types to CI build.
authorShane F. Carr <sffc@google.com>
Tue, 10 Sep 2019 04:14:43 +0000 (04:14 +0000)
committerShane F. Carr <shane@unicode.org>
Wed, 2 Oct 2019 17:00:14 +0000 (13:00 -0400)
See #824

.ci-builds/.azure-pipelines.yml
icu4c/source/test/intltest/strtest.cpp
icu4c/source/test/intltest/strtest.h

index 16548aa64d4ceedaebbbcb92a9d6a053680c502b..ed13185c09ec658119a597b1277b5a2c21ace48f 100644 (file)
@@ -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++
index 79a3d01697fe944365b8f8ff063a15902b74a5e7..7bb9662c36c58b01c7325d53fd4c4b43e309ac0c 100644 (file)
@@ -14,7 +14,7 @@
 *   created by: Markus W. Scherer
 */
 
-#if U_HAVE_STRING_VIEW
+#ifdef U_HAVE_STRING_VIEW
 #include <string_view>
 #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!";
index e620c8a93608d45005880521c401e82e8c51fb50..040c0b0e3c9f8017c346858f0d76d2215ed02d8f 100644 (file)
@@ -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();