WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
137360
Annoying build warnings in WTFString API tests
https://bugs.webkit.org/show_bug.cgi?id=137360
Summary
Annoying build warnings in WTFString API tests
Brendan Long
Reported
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.
Attachments
Patch
(4.49 KB, patch)
2014-10-02 14:46 PDT
,
Brendan Long
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Brendan Long
Comment 1
2014-10-02 14:46:05 PDT
Created
attachment 239141
[details]
Patch
Darin Adler
Comment 2
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.
WebKit Commit Bot
Comment 3
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
>
WebKit Commit Bot
Comment 4
2014-10-02 16:41:31 PDT
All reviewed patches have been landed. Closing bug.
Yusuke Suzuki
Comment 5
2014-10-03 19:13:36 PDT
***
Bug 137344
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug