[Webkit-unassigned] [Bug 185631] New: TestWebKitAPI: Fix warnings found by new clang compiler

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 14 14:52:45 PDT 2018


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

            Bug ID: 185631
           Summary: TestWebKitAPI: Fix warnings found by new clang
                    compiler
           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: ddkilzer at webkit.org
                CC: lforschler at apple.com,
                    webkit-bug-importer at group.apple.com

Building WebKit with a newer clang compiler emits a few new warnings in various TestWebKitAPI sources:


Tools/TestWebKitAPI/Tests/WebKit/FindMatches.mm:88:18: error: explicitly assigning value of variable of type 'WKRect' to itself [-Werror,-Wself-assign-overloaded]
            rect = rect;
            ~~~~ ^ ~~~~
1 error generated.


In file included from Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:26:
In file included from Tools/TestWebKitAPI/config.h:59:
Debug/gtest.framework/Headers/gtest.h:1263:16: error: comparison of integers of different signs: 'const long' and 'const (anonymous enum at Debug/WebKit.framework/PrivateHeaders/WKWebViewPrivate.h:88:9)' [-Werror,-Wsign-compare]
  if (expected == actual) {
      ~~~~~~~~ ^  ~~~~~~
Debug/gtest.framework/Headers/gtest.h:1299:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<long, (anonymous enum at Debug/WebKit.framework/PrivateHeaders/WKWebViewPrivate.h:88:9)>' requested here
    return CmpHelperEQ(expected_expression, actual_expression, expected,
           ^
Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:663:5: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<long, (anonymous enum at Debug/WebKit.framework/PrivateHeaders/WKWebViewPrivate.h:88:9)>' requested here
    EXPECT_EQ([[change objectForKey:NSKeyValueChangeOldKey] integerValue], _WKRectEdgeAll);
    ^
In file included from Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:26:
In file included from Tools/TestWebKitAPI/config.h:59:
Debug/gtest.framework/Headers/gtest.h:1761:67: note: expanded from macro 'EXPECT_EQ'
                      EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
                                                                  ^
1 error generated.


Tools/TestWebKitAPI/Tests/WTF/NakedPtr.cpp:175:13: error: explicitly assigning value of variable of type 'NakedPtr<TestWebKitAPI::RefLogger>' to itself [-Werror,-Wself-assign-overloaded]
        ptr = ptr;
        ~~~ ^ ~~~
1 error generated.


Tools/TestWebKitAPI/Tests/WTF/Poisoned.cpp:482:13: error: explicitly assigning value of variable of type 'Poisoned<TestWebKitAPI::(anonymous namespace)::TestPoisonA, TestWebKitAPI::RefLogger *>' (aka 'Poisoned<Poison<g_testPoisonA>, TestWebKitAPI::RefLogger *>') to itself [-Werror,-Wself-assign-overloaded]
        ptr = ptr;
        ~~~ ^ ~~~
1 error generated.


Tools/TestWebKitAPI/Tests/WTF/PoisonedRefPtr.cpp:307:13: error: explicitly assigning value of variable of type 'PoisonedRefPtr<TestWebKitAPI::(anonymous namespace)::PoisonE, TestWebKitAPI::RefLogger>' (aka 'WTF::RefPtr<TestWebKitAPI::RefLogger, WTF::PoisonedPtrTraits<WTF::Poison<&TestWebKitAPI::(anonymous namespace)::g_poisonE>, TestWebKitAPI::RefLogger> >') to itself [-Werror,-Wself-assign-overloaded]
        ptr = ptr;
        ~~~ ^ ~~~


Tools/TestWebKitAPI/Tests/WTF/RefPtr.cpp:263:13: error: explicitly assigning value of variable of type 'RefPtr<TestWebKitAPI::RefLogger>' to itself [-Werror,-Wself-assign-overloaded]
        ptr = ptr;
        ~~~ ^ ~~~
1 error generated.

-- 
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/20180514/79270e53/attachment.html>


More information about the webkit-unassigned mailing list