WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
240668
Fix boolean operation in WTF/BitMap test.
https://bugs.webkit.org/show_bug.cgi?id=240668
Summary
Fix boolean operation in WTF/BitMap test.
Basuke Suzuki
Reported
2022-05-19 10:26:14 PDT
Clang 14 starts complaining about using bitmap operator over boolean. ``` [280/1484] Building CXX object Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/Tests/WTF/Bitmap.cpp.o C:/PSDev/webkit/Tools/TestWebKitAPI/Tests/WTF/Bitmap.cpp:1172:32: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical] EXPECT_EQ(temp.get(i), bitmap1.get(i) | bitmap2.get(i)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ || C:/PSDev/webkit/Source/ThirdParty/gtest/include\gtest/gtest.h:2025:69: note: expanded from macro 'EXPECT_EQ' EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2) ^~~~ C:/PSDev/webkit/Source/ThirdParty/gtest/include\gtest/gtest_pred_impl.h:164:40: note: expanded from macro 'EXPECT_PRED_FORMAT2' GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_) ^~ C:/PSDev/webkit/Source/ThirdParty/gtest/include\gtest/gtest_pred_impl.h:149:43: note: expanded from macro 'GTEST_PRED_FORMAT2_' GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \ ^~ C:/PSDev/webkit/Source/ThirdParty/gtest/include\gtest/gtest_pred_impl.h:77:52: note: expanded from macro 'GTEST_ASSERT_' if (const ::testing::AssertionResult gtest_ar = (expression)) \ ^~~~~~~~~~ C:/PSDev/webkit/Tools/TestWebKitAPI/Tests/WTF/Bitmap.cpp:1190:5: note: in instantiation of function template specialization 'TestWebKitAPI::testBitmapOperatorBitOrAssignmentImpl<WTF::Bitmap<128, unsigned int>>' requested here testBitmapOperatorBitOrAssignmentImpl(size, bitmap1, bitmap2, bitmapZeroes, bitmapOnes); ^ C:/PSDev/webkit/Tools/TestWebKitAPI/Tests/WTF/Bitmap.cpp:1426:54: note: in instantiation of function template specialization 'TestWebKitAPI::testBitmapOperatorBitOrAssignment<uint32_t>' requested here TEST(WTF_Bitmap, OperatorBitOrAssignment_uint32_t) { testBitmapOperatorBitOrAssignment<uint32_t>(); } ^ C:/PSDev/webkit/Tools/TestWebKitAPI/Tests/WTF/Bitmap.cpp:1172:32: note: cast one or both operands to int to silence this warning EXPECT_EQ(temp.get(i), bitmap1.get(i) | bitmap2.get(i)); ^ ```
Attachments
Add attachment
proposed patch, testcase, etc.
Basuke Suzuki
Comment 1
2022-05-19 10:59:09 PDT
https://github.com/WebKit/WebKit/pull/792
EWS
Comment 2
2022-05-19 18:00:00 PDT
Committed
r294517
(
250773@main
): <
https://commits.webkit.org/250773@main
> Reviewed commits have been landed. Closing PR #792 and removing active labels.
Radar WebKit Bug Importer
Comment 3
2022-05-19 18:01:16 PDT
<
rdar://problem/93618775
>
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