[Webkit-unassigned] [Bug 240668] New: Fix boolean operation in WTF/BitMap test.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 19 10:26:14 PDT 2022


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

            Bug ID: 240668
           Summary: Fix boolean operation in WTF/BitMap test.
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: Basuke.Suzuki at sony.com

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));
                               ^

```

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220519/8949168a/attachment.htm>


More information about the webkit-unassigned mailing list