Title: [292840] trunk/Source
Revision
292840
Author
commit-qu...@webkit.org
Date
2022-04-13 15:55:26 -0700 (Wed, 13 Apr 2022)

Log Message

Misc compiler warnings, April 2022 edition
https://bugs.webkit.org/show_bug.cgi?id=239290

Patch by Michael Catanzaro <mcatanz...@gnome.org> on 2022-04-13
Reviewed by Adrian Perez de Castro.

Fix the usual spam of -Wreturn-type warnings.

Bonus warnings: unused variable, unknown pragmas, and redundant move.

* Source/_javascript_Core/bytecode/PropertyCondition.cpp:
(JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):
(JSC::watchabilityToConcurrency):
(JSC::PropertyCondition::validityRequiresImpurePropertyWatchpoint const):
* Source/_javascript_Core/runtime/JSObject.h:
(JSC::JSObject::getDirect const):
* Source/_javascript_Core/runtime/Structure.h:
(JSC::Structure::get):
* Source/WebKit/NetworkProcess/storage/OriginStorageManager.cpp:
(WebKit::OriginStorageManager::StorageBucket::resolvedPath):
* Source/WebCore/dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::canAccessResource const):
* Source/WebCore/page/DebugPageOverlays.cpp:
* Source/WebCore/page/InteractionRegion.cpp:
(WebCore::regionForElement):
* Source/WebCore/platform/graphics/GraphicsContextState.cpp:
(WebCore::stateChangeName):
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::getPathFromPathOperation):
* Source/WebCore/style/ContainerQueryEvaluator.cpp:
(WebCore::Style::ContainerQueryEvaluator::evaluateSizeFeature const):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::categoryAtMostRecentPlayback const):

Canonical link: https://commits.webkit.org/249613@main

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (292839 => 292840)


--- trunk/Source/_javascript_Core/ChangeLog	2022-04-13 22:50:04 UTC (rev 292839)
+++ trunk/Source/_javascript_Core/ChangeLog	2022-04-13 22:55:26 UTC (rev 292840)
@@ -1,3 +1,19 @@
+2022-04-13  Michael Catanzaro  <mcatanz...@redhat.com>
+
+        Misc compiler warnings, April 2022 edition
+        https://bugs.webkit.org/show_bug.cgi?id=239290
+
+        Reviewed by Adrian Perez de Castro.
+
+        * bytecode/PropertyCondition.cpp:
+        (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):
+        (JSC::watchabilityToConcurrency):
+        (JSC::PropertyCondition::validityRequiresImpurePropertyWatchpoint const):
+        * runtime/JSObject.h:
+        (JSC::JSObject::getDirect const):
+        * runtime/Structure.h:
+        (JSC::Structure::get):
+
 2022-04-13  Yusuke Suzuki  <ysuz...@apple.com>
 
         [JSC] Remove DeprecatedCallFrameForDebugger

Modified: trunk/Source/_javascript_Core/bytecode/PropertyCondition.cpp (292839 => 292840)


--- trunk/Source/_javascript_Core/bytecode/PropertyCondition.cpp	2022-04-13 22:50:04 UTC (rev 292839)
+++ trunk/Source/_javascript_Core/bytecode/PropertyCondition.cpp	2022-04-13 22:55:26 UTC (rev 292840)
@@ -263,7 +263,6 @@
     }
     
     RELEASE_ASSERT_NOT_REACHED();
-    return false;
 }
 
 static ALWAYS_INLINE Concurrency watchabilityToConcurrency(PropertyCondition::WatchabilityEffort effort)
@@ -274,6 +273,7 @@
     case PropertyCondition::WatchabilityEffort::MakeNoChanges:
         return Concurrency::ConcurrentThread;
     }
+    RELEASE_ASSERT_NOT_REACHED();
 }
 
 bool PropertyCondition::validityRequiresImpurePropertyWatchpoint(Structure* structure) const
@@ -293,7 +293,6 @@
     }
     
     RELEASE_ASSERT_NOT_REACHED();
-    return false;
 }
 
 bool PropertyCondition::isStillValid(Concurrency concurrency, Structure* structure, JSObject* base) const

Modified: trunk/Source/_javascript_Core/runtime/JSObject.h (292839 => 292840)


--- trunk/Source/_javascript_Core/runtime/JSObject.h	2022-04-13 22:50:04 UTC (rev 292839)
+++ trunk/Source/_javascript_Core/runtime/JSObject.h	2022-04-13 22:55:26 UTC (rev 292840)
@@ -1421,8 +1421,9 @@
     case Concurrency::ConcurrentThread:
         return getDirectConcurrently(expectedStructure, offset);
     }
+    RELEASE_ASSERT_NOT_REACHED();
+}
 
-}
 inline JSValue JSObject::getDirectConcurrently(Structure* structure, PropertyOffset offset) const
 {
     ConcurrentJSLocker locker(structure->lock());

Modified: trunk/Source/_javascript_Core/runtime/Structure.h (292839 => 292840)


--- trunk/Source/_javascript_Core/runtime/Structure.h	2022-04-13 22:50:04 UTC (rev 292839)
+++ trunk/Source/_javascript_Core/runtime/Structure.h	2022-04-13 22:55:26 UTC (rev 292840)
@@ -524,6 +524,7 @@
         case Concurrency::ConcurrentThread:
             return getConcurrently(uid, attributes);
         }
+        RELEASE_ASSERT_NOT_REACHED();
     }
 
     ALWAYS_INLINE PropertyOffset get(VM& vm, Concurrency concurrency, UniquedStringImpl* uid)
@@ -535,6 +536,7 @@
         case Concurrency::ConcurrentThread:
             return getConcurrently(uid);
         }
+        RELEASE_ASSERT_NOT_REACHED();
     }
     
     PropertyOffset getConcurrently(UniquedStringImpl* uid);

Modified: trunk/Source/WebCore/ChangeLog (292839 => 292840)


--- trunk/Source/WebCore/ChangeLog	2022-04-13 22:50:04 UTC (rev 292839)
+++ trunk/Source/WebCore/ChangeLog	2022-04-13 22:55:26 UTC (rev 292840)
@@ -1,3 +1,24 @@
+2022-04-13  Michael Catanzaro  <mcatanz...@redhat.com>
+
+        Misc compiler warnings, April 2022 edition
+        https://bugs.webkit.org/show_bug.cgi?id=239290
+
+        Reviewed by Adrian Perez de Castro.
+
+        * dom/ScriptExecutionContext.cpp:
+        (WebCore::ScriptExecutionContext::canAccessResource const):
+        * page/DebugPageOverlays.cpp:
+        * page/InteractionRegion.cpp:
+        (WebCore::regionForElement):
+        * platform/graphics/GraphicsContextState.cpp:
+        (WebCore::stateChangeName):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::getPathFromPathOperation):
+        * style/ContainerQueryEvaluator.cpp:
+        (WebCore::Style::ContainerQueryEvaluator::evaluateSizeFeature const):
+        * testing/Internals.cpp:
+        (WebCore::Internals::categoryAtMostRecentPlayback const):
+
 2022-04-13  Diego Pino Garcia  <dp...@igalia.com>
 
         Unreviewed, fix non-unified build after r292810

Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.cpp (292839 => 292840)


--- trunk/Source/WebCore/dom/ScriptExecutionContext.cpp	2022-04-13 22:50:04 UTC (rev 292839)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.cpp	2022-04-13 22:55:26 UTC (rev 292840)
@@ -752,6 +752,7 @@
             return HasResourceAccess::DefaultForThirdParty;
         return HasResourceAccess::Yes;
     }
+    RELEASE_ASSERT_NOT_REACHED();
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/page/DebugPageOverlays.cpp (292839 => 292840)


--- trunk/Source/WebCore/page/DebugPageOverlays.cpp	2022-04-13 22:50:04 UTC (rev 292839)
+++ trunk/Source/WebCore/page/DebugPageOverlays.cpp	2022-04-13 22:55:26 UTC (rev 292840)
@@ -80,7 +80,9 @@
     bool m_regionChanged { true };
 };
 
+#if COMPILER(CLANG)
 #pragma mark - MouseWheelRegionOverlay
+#endif
 
 class MouseWheelRegionOverlay final : public RegionOverlay {
 public:
@@ -123,7 +125,9 @@
 #endif
 }
 
+#if COMPILER(CLANG)
 #pragma mark - NonFastScrollableRegionOverlay
+#endif
 
 class NonFastScrollableRegionOverlay final : public RegionOverlay {
 public:
@@ -229,7 +233,9 @@
     drawRegion(context, m_eventTrackingRegions.asynchronousDispatchRegion, m_color, bounds);
 }
 
+#if COMPILER(CLANG)
 #pragma mark - InteractionRegionOverlay
+#endif
 
 class InteractionRegionOverlay final : public RegionOverlay {
 public:
@@ -550,7 +556,9 @@
     return false;
 }
 
+#if COMPILER(CLANG)
 #pragma mark - RegionOverlay
+#endif
 
 Ref<RegionOverlay> RegionOverlay::create(Page& page, DebugPageOverlays::RegionType regionType)
 {
@@ -631,7 +639,9 @@
     m_regionChanged = false;
 }
 
+#if COMPILER(CLANG)
 #pragma mark - DebugPageOverlays
+#endif
 
 DebugPageOverlays& DebugPageOverlays::singleton()
 {

Modified: trunk/Source/WebCore/page/InteractionRegion.cpp (292839 => 292840)


--- trunk/Source/WebCore/page/InteractionRegion.cpp	2022-04-13 22:50:04 UTC (rev 292839)
+++ trunk/Source/WebCore/page/InteractionRegion.cpp	2022-04-13 22:55:26 UTC (rev 292840)
@@ -114,7 +114,7 @@
         return contentsRect;
     });
         
-    return WTFMove(region);
+    return region;
 }
 
 static CursorType cursorTypeForElement(Element& element)

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContextState.cpp (292839 => 292840)


--- trunk/Source/WebCore/platform/graphics/GraphicsContextState.cpp	2022-04-13 22:50:04 UTC (rev 292839)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContextState.cpp	2022-04-13 22:55:26 UTC (rev 292840)
@@ -154,6 +154,8 @@
         return "use-dark-appearance";
 #endif
     }
+
+    RELEASE_ASSERT_NOT_REACHED();
 }
 
 TextStream& GraphicsContextState::dump(TextStream& ts) const

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (292839 => 292840)


--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2022-04-13 22:50:04 UTC (rev 292839)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2022-04-13 22:55:26 UTC (rev 292840)
@@ -1537,6 +1537,7 @@
         // FIXME: implement ray- https://bugs.webkit.org/show_bug.cgi?id=233344
         return std::nullopt;
     }
+    RELEASE_ASSERT_NOT_REACHED();
 }
 
 static PathTraversalState getTraversalStateAtDistance(const Path& path, const Length& distance)

Modified: trunk/Source/WebCore/style/ContainerQueryEvaluator.cpp (292839 => 292840)


--- trunk/Source/WebCore/style/ContainerQueryEvaluator.cpp	2022-04-13 22:50:04 UTC (rev 292839)
+++ trunk/Source/WebCore/style/ContainerQueryEvaluator.cpp	2022-04-13 22:55:26 UTC (rev 292840)
@@ -249,6 +249,7 @@
         case ContainerType::None:
             return true;
         }
+        RELEASE_ASSERT_NOT_REACHED();
     };
 
     if (!hasEligibleContainment())

Modified: trunk/Source/WebCore/testing/Internals.cpp (292839 => 292840)


--- trunk/Source/WebCore/testing/Internals.cpp	2022-04-13 22:50:04 UTC (rev 292839)
+++ trunk/Source/WebCore/testing/Internals.cpp	2022-04-13 22:55:26 UTC (rev 292840)
@@ -5692,6 +5692,7 @@
 #if USE(AUDIO_SESSION)
     return element.categoryAtMostRecentPlayback();
 #else
+    UNUSED_PARAM(element);
     return AudioSessionCategory::None;
 #endif
 }

Modified: trunk/Source/WebKit/ChangeLog (292839 => 292840)


--- trunk/Source/WebKit/ChangeLog	2022-04-13 22:50:04 UTC (rev 292839)
+++ trunk/Source/WebKit/ChangeLog	2022-04-13 22:55:26 UTC (rev 292840)
@@ -1,3 +1,13 @@
+2022-04-13  Michael Catanzaro  <mcatanz...@redhat.com>
+
+        Misc compiler warnings, April 2022 edition
+        https://bugs.webkit.org/show_bug.cgi?id=239290
+
+        Reviewed by Adrian Perez de Castro.
+
+        * NetworkProcess/storage/OriginStorageManager.cpp:
+        (WebKit::OriginStorageManager::StorageBucket::resolvedPath):
+
 2022-04-13  Simon Fraser  <simon.fra...@apple.com>
 
         [css-scroll-snap] scrollIntoView fails with scroll-snap-type on :root

Modified: trunk/Source/WebKit/NetworkProcess/storage/OriginStorageManager.cpp (292839 => 292840)


--- trunk/Source/WebKit/NetworkProcess/storage/OriginStorageManager.cpp	2022-04-13 22:50:04 UTC (rev 292839)
+++ trunk/Source/WebKit/NetworkProcess/storage/OriginStorageManager.cpp	2022-04-13 22:55:26 UTC (rev 292840)
@@ -435,6 +435,7 @@
     case StorageType::FileSystem:
         return typeStoragePath(*type);
     }
+    RELEASE_ASSERT_NOT_REACHED();
 }
 
 String OriginStorageManager::originFileIdentifier()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to