[Webkit-unassigned] [Bug 137360] New: Annoying build warnings in WTFString API tests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 2 14:13:32 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=137360

           Summary: Annoying build warnings in WTFString API tests
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: b.long at cablelabs.com


I just built WebKitGTK and got a bunch of output like this:

[6/7] Building CXX object Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/Tests/WTF/WTFString.cpp.o
../../Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp: In member function ‘virtual void TestWebKitAPI::WTF_StringToInt_Test::TestBody()’:
../../Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp:169:158: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]
     EXPECT_EQ(false, ok);
                                                                                                                                                              ^
../../Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp:173:158: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]
     EXPECT_EQ(false, ok);
                                                                                                                                                              ^
../../Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp:189:158: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]
     EXPECT_EQ(false, ok);
                                                                                                                                                              ^
../../Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp:197:158: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]
     EXPECT_EQ(false, ok);
                                                                                                                                                              ^
../../Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp:202:158: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]
     EXPECT_EQ(false, ok);
                                                                                                                                                              ^
../../Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp: In member function ‘virtual void TestWebKitAPI::WTF_StringToDouble_Test::TestBody()’:
../../Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp:221:158: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]
     EXPECT_EQ(false, ok);
                                                                                                                                                              ^
../../Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp:225:158: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]
     EXPECT_EQ(false, ok);
                                                                                                                                                              ^
../../Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp:238:158: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]
     EXPECT_EQ(false, ok);
                                                                                                                                                              ^
../../Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp:250:158: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]
     EXPECT_EQ(false, ok);
                                                                                                                                                              ^
../../Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp:255:158: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]
     EXPECT_EQ(false, ok);
                                                                                                                                                              ^
../../Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp:260:158: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]
     EXPECT_EQ(false, ok);
                                                                                                                                                              ^
I'm not sure why EXPECT_EQ(false, ...) causes these warnings, but it seems like EXPECT_TRUE and EXPECT_FALSE are more clear anyway in these cases.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list