Title: [259093] trunk/Source
Revision
259093
Author
commit-qu...@webkit.org
Date
2020-03-26 16:54:19 -0700 (Thu, 26 Mar 2020)

Log Message

Fix various compiler warnings
https://bugs.webkit.org/show_bug.cgi?id=209438

Patch by Michael Catanzaro <mcatanz...@gnome.org> on 2020-03-26
Reviewed by Darin Adler.

Source/WebCore:

* dom/Element.cpp: Fix -Wunused-variable warnings.
(WebCore::Element::webAnimations const):
(WebCore::Element::cssAnimations const):
(WebCore::Element::transitions const):
(WebCore::Element::hasCompletedTransitionsForProperty const):
(WebCore::Element::hasRunningTransitionsForProperty const):
(WebCore::Element::hasRunningTransitions const):
* page/scrolling/ThreadedScrollingTree.cpp: Fix -Wunused-variable warning.
(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
* platform/network/HTTPParsers.h: Fix -Wredundant-move warning.
(WebCore::parseAccessControlAllowList):

Source/WebKit:

* UIProcess/API/C/WKPage.cpp: Suppress -Wdeprecated-declaration warnings.
(WKPageSetPageLoaderClient):
(WKPageSetPagePolicyClient):

Source/WTF:

Suppress -Wclass-memaccess warning. ConcurrentBuffer is documented to support types that are
bit-copyable but not copy-constructable. This is strange, but who am I to question it?

* wtf/ConcurrentBuffer.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (259092 => 259093)


--- trunk/Source/WTF/ChangeLog	2020-03-26 23:27:57 UTC (rev 259092)
+++ trunk/Source/WTF/ChangeLog	2020-03-26 23:54:19 UTC (rev 259093)
@@ -1,3 +1,15 @@
+2020-03-26  Michael Catanzaro  <mcatanz...@gnome.org>
+
+        Fix various compiler warnings
+        https://bugs.webkit.org/show_bug.cgi?id=209438
+
+        Reviewed by Darin Adler.
+
+        Suppress -Wclass-memaccess warning. ConcurrentBuffer is documented to support types that are
+        bit-copyable but not copy-constructable. This is strange, but who am I to question it?
+
+        * wtf/ConcurrentBuffer.h:
+
 2020-03-25  Christopher Reid  <chris.r...@sony.com>
 
         [PlayStation] Specify a 16 KB minimum page size

Modified: trunk/Source/WTF/wtf/ConcurrentBuffer.h (259092 => 259093)


--- trunk/Source/WTF/wtf/ConcurrentBuffer.h	2020-03-26 23:27:57 UTC (rev 259092)
+++ trunk/Source/WTF/wtf/ConcurrentBuffer.h	2020-03-26 23:54:19 UTC (rev 259093)
@@ -66,8 +66,9 @@
             return;
         Array* newArray = createArray(newSize);
         // This allows us to do ConcurrentBuffer<std::unique_ptr<>>.
+        // static_cast<void*> avoids triggering -Wclass-memaccess.
         if (array)
-            memcpy(newArray->data, array->data, sizeof(T) * array->size);
+            memcpy(static_cast<void*>(newArray->data), array->data, sizeof(T) * array->size);
         for (size_t i = array ? array->size : 0; i < newSize; ++i)
             new (newArray->data + i) T();
         WTF::storeStoreFence();

Modified: trunk/Source/WebCore/ChangeLog (259092 => 259093)


--- trunk/Source/WebCore/ChangeLog	2020-03-26 23:27:57 UTC (rev 259092)
+++ trunk/Source/WebCore/ChangeLog	2020-03-26 23:54:19 UTC (rev 259093)
@@ -1,3 +1,22 @@
+2020-03-26  Michael Catanzaro  <mcatanz...@gnome.org>
+
+        Fix various compiler warnings
+        https://bugs.webkit.org/show_bug.cgi?id=209438
+
+        Reviewed by Darin Adler.
+
+        * dom/Element.cpp: Fix -Wunused-variable warnings.
+        (WebCore::Element::webAnimations const):
+        (WebCore::Element::cssAnimations const):
+        (WebCore::Element::transitions const):
+        (WebCore::Element::hasCompletedTransitionsForProperty const):
+        (WebCore::Element::hasRunningTransitionsForProperty const):
+        (WebCore::Element::hasRunningTransitions const):
+        * page/scrolling/ThreadedScrollingTree.cpp: Fix -Wunused-variable warning.
+        (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
+        * platform/network/HTTPParsers.h: Fix -Wredundant-move warning.
+        (WebCore::parseAccessControlAllowList):
+
 2020-03-26  Sihui Liu  <sihui_...@apple.com>
 
         REGRESSION(r259034): access to null UniqueIDBDatabase in UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection()

Modified: trunk/Source/WebCore/dom/Element.cpp (259092 => 259093)


--- trunk/Source/WebCore/dom/Element.cpp	2020-03-26 23:27:57 UTC (rev 259092)
+++ trunk/Source/WebCore/dom/Element.cpp	2020-03-26 23:54:19 UTC (rev 259093)
@@ -3800,7 +3800,7 @@
 const AnimationCollection* Element::webAnimations() const
 {
     if (auto* animationData = animationRareData())
-        return &animationRareData()->webAnimations();
+        return &animationData->webAnimations();
     return nullptr;
 }
 
@@ -3807,7 +3807,7 @@
 const AnimationCollection* Element::cssAnimations() const
 {
     if (auto* animationData = animationRareData())
-        return &animationRareData()->cssAnimations();
+        return &animationData->cssAnimations();
     return nullptr;
 }
 
@@ -3814,7 +3814,7 @@
 const AnimationCollection* Element::transitions() const
 {
     if (auto* animationData = animationRareData())
-        return &animationRareData()->transitions();
+        return &animationData->transitions();
     return nullptr;
 }
 
@@ -3821,7 +3821,7 @@
 bool Element::hasCompletedTransitionsForProperty(CSSPropertyID property) const
 {
     if (auto* animationData = animationRareData())
-        return animationRareData()->completedTransitionsByProperty().contains(property);
+        return animationData->completedTransitionsByProperty().contains(property);
     return false;
 }
 
@@ -3828,7 +3828,7 @@
 bool Element::hasRunningTransitionsForProperty(CSSPropertyID property) const
 {
     if (auto* animationData = animationRareData())
-        return animationRareData()->runningTransitionsByProperty().contains(property);
+        return animationData->runningTransitionsByProperty().contains(property);
     return false;
 }
 
@@ -3835,7 +3835,7 @@
 bool Element::hasRunningTransitions() const
 {
     if (auto* animationData = animationRareData())
-        return !animationRareData()->runningTransitionsByProperty().isEmpty();
+        return !animationData->runningTransitionsByProperty().isEmpty();
     return false;
 }
 

Modified: trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp (259092 => 259093)


--- trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp	2020-03-26 23:27:57 UTC (rev 259092)
+++ trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp	2020-03-26 23:54:19 UTC (rev 259093)
@@ -109,10 +109,8 @@
     if (is<ScrollingTreeFrameScrollingNode>(node))
         layoutViewportOrigin = downcast<ScrollingTreeFrameScrollingNode>(node).layoutViewport().location();
 
-    bool monitoringWheelEvents = false;
 #if PLATFORM(MAC)
-    monitoringWheelEvents = isMonitoringWheelEvents();
-    if (monitoringWheelEvents)
+    if (isMonitoringWheelEvents())
         deferWheelEventTestCompletionForReason(reinterpret_cast<WheelEventTestMonitor::ScrollableAreaIdentifier>(node.scrollingNodeID()), WheelEventTestMonitor::ScrollingThreadSyncNeeded);
 #endif
 

Modified: trunk/Source/WebCore/platform/network/HTTPParsers.h (259092 => 259093)


--- trunk/Source/WebCore/platform/network/HTTPParsers.h	2020-03-26 23:27:57 UTC (rev 259092)
+++ trunk/Source/WebCore/platform/network/HTTPParsers.h	2020-03-26 23:54:19 UTC (rev 259093)
@@ -172,7 +172,7 @@
         if (!addToAccessControlAllowList(string, start, string.length() - 1, set))
             return { };
     }
-    return WTFMove(set);
+    return set;
 }
 
 }

Modified: trunk/Source/WebKit/ChangeLog (259092 => 259093)


--- trunk/Source/WebKit/ChangeLog	2020-03-26 23:27:57 UTC (rev 259092)
+++ trunk/Source/WebKit/ChangeLog	2020-03-26 23:54:19 UTC (rev 259093)
@@ -1,3 +1,14 @@
+2020-03-26  Michael Catanzaro  <mcatanz...@gnome.org>
+
+        Fix various compiler warnings
+        https://bugs.webkit.org/show_bug.cgi?id=209438
+
+        Reviewed by Darin Adler.
+
+        * UIProcess/API/C/WKPage.cpp: Suppress -Wdeprecated-declaration warnings.
+        (WKPageSetPageLoaderClient):
+        (WKPageSetPagePolicyClient):
+
 2020-03-26  Daniel Bates  <daba...@apple.com>
 
         Rename -_isInteractingWithFocusedElement, add it to the header, and replace calls to hasFocusedElement() with it

Modified: trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp (259092 => 259093)


--- trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp	2020-03-26 23:27:57 UTC (rev 259092)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp	2020-03-26 23:54:19 UTC (rev 259093)
@@ -1203,7 +1203,12 @@
 
     WebPageProxy* webPageProxy = toImpl(pageRef);
 
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+    // GCC 10 gets confused here and warns that WKPageSetPagePolicyClient is deprecated when we call
+    // makeUnique<LoaderClient>(). This seems to be a GCC bug. It's not really appropriate to use
+    // ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END here because we are not using a deprecated symbol.
     auto loaderClient = makeUnique<LoaderClient>(wkClient);
+ALLOW_DEPRECATED_DECLARATIONS_END
 
     // It would be nice to get rid of this code and transition all clients to using didLayout instead of
     // didFirstLayoutInFrame and didFirstVisuallyNonEmptyLayoutInFrame. In the meantime, this is required
@@ -1285,7 +1290,12 @@
         }
     };
 
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+    // GCC 10 gets confused here and warns that WKPageSetPagePolicyClient is deprecated when we call
+    // makeUnique<PolicyClient>(). This seems to be a GCC bug. It's not really appropriate to use
+    // ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END here because we are not using a deprecated symbol.
     toImpl(pageRef)->setPolicyClient(makeUnique<PolicyClient>(wkClient));
+ALLOW_DEPRECATED_DECLARATIONS_END
 }
 
 namespace WebKit {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to