Bug 240668

Summary: Fix boolean operation in WTF/BitMap test.
Product: WebKit Reporter: Basuke Suzuki <basuke>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

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
Basuke Suzuki
Comment 1 2022-05-19 10:59:09 PDT
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
Note You need to log in before you can comment on or make changes to this bug.