Bug 137360 - Annoying build warnings in WTFString API tests
Summary: Annoying build warnings in WTFString API tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brendan Long
URL:
Keywords:
: 137344 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-10-02 14:13 PDT by Brendan Long
Modified: 2014-10-03 19:13 PDT (History)
2 users (show)

See Also:


Attachments
Patch (4.49 KB, patch)
2014-10-02 14:46 PDT, Brendan Long
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Long 2014-10-02 14:13:29 PDT
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.
Comment 1 Brendan Long 2014-10-02 14:46:05 PDT
Created attachment 239141 [details]
Patch
Comment 2 Darin Adler 2014-10-02 16:03:19 PDT
Comment on attachment 239141 [details]
Patch

Change seems fine. I think the GTK compiler has a configuration problem of some sort.
Comment 3 WebKit Commit Bot 2014-10-02 16:41:29 PDT
Comment on attachment 239141 [details]
Patch

Clearing flags on attachment: 239141

Committed r174246: <http://trac.webkit.org/changeset/174246>
Comment 4 WebKit Commit Bot 2014-10-02 16:41:31 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Yusuke Suzuki 2014-10-03 19:13:36 PDT
*** Bug 137344 has been marked as a duplicate of this bug. ***