Title: [255548] trunk/Source
Revision
255548
Author
[email protected]
Date
2020-02-01 19:57:10 -0800 (Sat, 01 Feb 2020)

Log Message

Silence compiler warnings
https://bugs.webkit.org/show_bug.cgi?id=207015

Patch by Michael Catanzaro <[email protected]> on 2020-02-01
Reviewed by Darin Adler.

Source/WebCore:

* accessibility/AXObjectCache.cpp:
(WebCore::characterForCharacterOffset): Use IGNORE_CLANG_WARNINGS macros to avoid
warnings when using GCC. GCC freaks out when it doesn't recognize a warning passed to
IGNORE_WARNINGS_BEGIN().
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::buildObjectForCanvas): Fix -Wredundant-move
* platform/PasteboardItemInfo.h: Fix -Wredundant-move
(WebCore::PresentationSize::decode):
(WebCore::PasteboardItemInfo::decode):

Source/WebKit:

Use UNUSED_VARIABLE() for variable that is only used inside RELEASE_LOG(), which is
Apple-specific.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didFailLoading):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (255547 => 255548)


--- trunk/Source/WebCore/ChangeLog	2020-02-02 03:40:31 UTC (rev 255547)
+++ trunk/Source/WebCore/ChangeLog	2020-02-02 03:57:10 UTC (rev 255548)
@@ -1,3 +1,20 @@
+2020-02-01  Michael Catanzaro  <[email protected]>
+
+        Silence compiler warnings
+        https://bugs.webkit.org/show_bug.cgi?id=207015
+
+        Reviewed by Darin Adler.
+
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::characterForCharacterOffset): Use IGNORE_CLANG_WARNINGS macros to avoid
+        warnings when using GCC. GCC freaks out when it doesn't recognize a warning passed to
+        IGNORE_WARNINGS_BEGIN().
+        * inspector/InspectorCanvas.cpp:
+        (WebCore::InspectorCanvas::buildObjectForCanvas): Fix -Wredundant-move
+        * platform/PasteboardItemInfo.h: Fix -Wredundant-move
+        (WebCore::PresentationSize::decode):
+        (WebCore::PasteboardItemInfo::decode):
+
 2020-02-01  Devin Rousso  <[email protected]>
 
         Web Inspector: move the items in the toolbar into the tab bar to save vertical space

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (255547 => 255548)


--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2020-02-02 03:40:31 UTC (rev 255547)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2020-02-02 03:57:10 UTC (rev 255548)
@@ -2515,10 +2515,10 @@
     UChar32 ch = 0;
     unsigned offset = characterOffset.startIndex + characterOffset.offset;
     if (offset < characterOffset.node->textContent().length()) {
-// FIXME: Remove IGNORE_WARNINGS macros once one of <rdar://problem/58615489&58615391> is fixed.
-IGNORE_WARNINGS_BEGIN("conditional-uninitialized")
+// FIXME: Remove IGNORE_CLANG_WARNINGS macros once one of <rdar://problem/58615489&58615391> is fixed.
+IGNORE_CLANG_WARNINGS_BEGIN("conditional-uninitialized")
         U16_NEXT(characterOffset.node->textContent(), offset, characterOffset.node->textContent().length(), ch);
-IGNORE_WARNINGS_END
+IGNORE_CLANG_WARNINGS_END
     }
     return ch;
 }

Modified: trunk/Source/WebCore/inspector/InspectorCanvas.cpp (255547 => 255548)


--- trunk/Source/WebCore/inspector/InspectorCanvas.cpp	2020-02-02 03:40:31 UTC (rev 255547)
+++ trunk/Source/WebCore/inspector/InspectorCanvas.cpp	2020-02-02 03:57:10 UTC (rev 255548)
@@ -493,7 +493,7 @@
                 auto contextAttributesPayload = Inspector::Protocol::Canvas::ContextAttributes::create()
                     .release();
                 contextAttributesPayload->setAlpha(downcast<ImageBitmapRenderingContext>(context).hasAlpha());
-                return WTFMove(contextAttributesPayload);
+                return contextAttributesPayload;
             }
 
 #if ENABLE(WEBGL)
@@ -519,7 +519,7 @@
                         break;
                     }
                     contextAttributesPayload->setFailIfMajorPerformanceCaveat(attributes->failIfMajorPerformanceCaveat);
-                    return WTFMove(contextAttributesPayload);
+                    return contextAttributesPayload;
                 }
             }
 #endif

Modified: trunk/Source/WebCore/platform/PasteboardItemInfo.h (255547 => 255548)


--- trunk/Source/WebCore/platform/PasteboardItemInfo.h	2020-02-02 03:40:31 UTC (rev 255547)
+++ trunk/Source/WebCore/platform/PasteboardItemInfo.h	2020-02-02 03:57:10 UTC (rev 255548)
@@ -61,7 +61,7 @@
     if (!decoder.decode(result.height))
         return WTF::nullopt;
 
-    return WTFMove(result);
+    return result;
 }
 
 struct PasteboardItemInfo {
@@ -161,7 +161,7 @@
     if (!decoder.decodeEnum(result.preferredPresentationStyle))
         return WTF::nullopt;
 
-    return WTFMove(result);
+    return result;
 }
 
 }

Modified: trunk/Source/WebKit/ChangeLog (255547 => 255548)


--- trunk/Source/WebKit/ChangeLog	2020-02-02 03:40:31 UTC (rev 255547)
+++ trunk/Source/WebKit/ChangeLog	2020-02-02 03:57:10 UTC (rev 255548)
@@ -1,3 +1,16 @@
+2020-02-01  Michael Catanzaro  <[email protected]>
+
+        Silence compiler warnings
+        https://bugs.webkit.org/show_bug.cgi?id=207015
+
+        Reviewed by Darin Adler.
+
+        Use UNUSED_VARIABLE() for variable that is only used inside RELEASE_LOG(), which is
+        Apple-specific.
+
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::NetworkResourceLoader::didFailLoading):
+
 2020-02-01  Devin Rousso  <[email protected]>
 
         Web Inspector: move the items in the toolbar into the tab bar to save vertical space

Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (255547 => 255548)


--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp	2020-02-02 03:40:31 UTC (rev 255547)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp	2020-02-02 03:57:10 UTC (rev 255548)
@@ -650,6 +650,7 @@
     wasServiceWorkerLoad = !!m_serviceWorkerFetchTask;
 #endif
     RELEASE_LOG_ERROR_IF_ALLOWED("didFailLoading: (wasServiceWorkerLoad=%d, isTimeout=%d, isCancellation=%d, isAccessControl=%d, errorCode=%d)", wasServiceWorkerLoad, error.isTimeout(), error.isCancellation(), error.isAccessControl(), error.errorCode());
+    UNUSED_VARIABLE(wasServiceWorkerLoad);
 
     if (shouldCaptureExtraNetworkLoadMetrics())
         m_connection->removeNetworkLoadInformation(identifier());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to