Skip to content
Permalink
Browse files
Misc compiler warnings, April 2022 edition
https://bugs.webkit.org/show_bug.cgi?id=239290

Patch by Michael Catanzaro <mcatanzaro@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/JavaScriptCore/bytecode/PropertyCondition.cpp:
(JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):
(JSC::watchabilityToConcurrency):
(JSC::PropertyCondition::validityRequiresImpurePropertyWatchpoint const):
* Source/JavaScriptCore/runtime/JSObject.h:
(JSC::JSObject::getDirect const):
* Source/JavaScriptCore/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
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
mcatanzaro authored and webkit-commit-queue committed Apr 13, 2022
1 parent e4c802e commit 832b6c003557b71b1c814a71e5b8b71b33a77c3d
Show file tree
Hide file tree
Showing 14 changed files with 70 additions and 4 deletions.
@@ -1,3 +1,19 @@
2022-04-13 Michael Catanzaro <mcatanzaro@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 <ysuzuki@apple.com>

[JSC] Remove DeprecatedCallFrameForDebugger
@@ -263,7 +263,6 @@ bool PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint(
}

RELEASE_ASSERT_NOT_REACHED();
return false;
}

static ALWAYS_INLINE Concurrency watchabilityToConcurrency(PropertyCondition::WatchabilityEffort effort)
@@ -274,6 +273,7 @@ static ALWAYS_INLINE Concurrency watchabilityToConcurrency(PropertyCondition::Wa
case PropertyCondition::WatchabilityEffort::MakeNoChanges:
return Concurrency::ConcurrentThread;
}
RELEASE_ASSERT_NOT_REACHED();
}

bool PropertyCondition::validityRequiresImpurePropertyWatchpoint(Structure* structure) const
@@ -293,7 +293,6 @@ bool PropertyCondition::validityRequiresImpurePropertyWatchpoint(Structure* stru
}

RELEASE_ASSERT_NOT_REACHED();
return false;
}

bool PropertyCondition::isStillValid(Concurrency concurrency, Structure* structure, JSObject* base) const
@@ -1421,8 +1421,9 @@ ALWAYS_INLINE JSValue JSObject::getDirect(Concurrency concurrency, Structure* ex
case Concurrency::ConcurrentThread:
return getDirectConcurrently(expectedStructure, offset);
}

RELEASE_ASSERT_NOT_REACHED();
}

inline JSValue JSObject::getDirectConcurrently(Structure* structure, PropertyOffset offset) const
{
ConcurrentJSLocker locker(structure->lock());
@@ -524,6 +524,7 @@ class Structure : public JSCell {
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 @@ class Structure : public JSCell {
case Concurrency::ConcurrentThread:
return getConcurrently(uid);
}
RELEASE_ASSERT_NOT_REACHED();
}

PropertyOffset getConcurrently(UniquedStringImpl* uid);
@@ -1,3 +1,24 @@
2022-04-13 Michael Catanzaro <mcatanzaro@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 <dpino@igalia.com>

Unreviewed, fix non-unified build after r292810
@@ -752,6 +752,7 @@ ScriptExecutionContext::HasResourceAccess ScriptExecutionContext::canAccessResou
return HasResourceAccess::DefaultForThirdParty;
return HasResourceAccess::Yes;
}
RELEASE_ASSERT_NOT_REACHED();
}

} // namespace WebCore
@@ -80,7 +80,9 @@ class RegionOverlay : public RefCounted<RegionOverlay>, public PageOverlay::Clie
bool m_regionChanged { true };
};

#if COMPILER(CLANG)
#pragma mark - MouseWheelRegionOverlay
#endif

class MouseWheelRegionOverlay final : public RegionOverlay {
public:
@@ -123,7 +125,9 @@ bool MouseWheelRegionOverlay::updateRegion()
#endif
}

#if COMPILER(CLANG)
#pragma mark - NonFastScrollableRegionOverlay
#endif

class NonFastScrollableRegionOverlay final : public RegionOverlay {
public:
@@ -229,7 +233,9 @@ void NonFastScrollableRegionOverlay::drawRect(PageOverlay& pageOverlay, Graphics
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 @@ bool InteractionRegionOverlay::mouseEvent(PageOverlay& overlay, const PlatformMo
return false;
}

#if COMPILER(CLANG)
#pragma mark - RegionOverlay
#endif

Ref<RegionOverlay> RegionOverlay::create(Page& page, DebugPageOverlays::RegionType regionType)
{
@@ -631,7 +639,9 @@ void RegionOverlay::recomputeRegion()
m_regionChanged = false;
}

#if COMPILER(CLANG)
#pragma mark - DebugPageOverlays
#endif

DebugPageOverlays& DebugPageOverlays::singleton()
{
@@ -114,7 +114,7 @@ static std::optional<InteractionRegion> regionForElement(Element& element)
return contentsRect;
});

return WTFMove(region);
return region;
}

static CursorType cursorTypeForElement(Element& element)
@@ -154,6 +154,8 @@ static const char* stateChangeName(GraphicsContextState::Change change)
return "use-dark-appearance";
#endif
}

RELEASE_ASSERT_NOT_REACHED();
}

TextStream& GraphicsContextState::dump(TextStream& ts) const
@@ -1537,6 +1537,7 @@ static std::optional<Path> getPathFromPathOperation(const FloatRect& box, const
// 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)
@@ -249,6 +249,7 @@ auto ContainerQueryEvaluator::evaluateSizeFeature(const CQ::SizeFeature& sizeFea
case ContainerType::None:
return true;
}
RELEASE_ASSERT_NOT_REACHED();
};

if (!hasEligibleContainment())
@@ -5692,6 +5692,7 @@ auto Internals::categoryAtMostRecentPlayback(HTMLMediaElement& element) const ->
#if USE(AUDIO_SESSION)
return element.categoryAtMostRecentPlayback();
#else
UNUSED_PARAM(element);
return AudioSessionCategory::None;
#endif
}
@@ -1,3 +1,13 @@
2022-04-13 Michael Catanzaro <mcatanzaro@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.fraser@apple.com>

[css-scroll-snap] scrollIntoView fails with scroll-snap-type on :root
@@ -435,6 +435,7 @@ String OriginStorageManager::StorageBucket::resolvedPath(WebsiteDataType webiste
case StorageType::FileSystem:
return typeStoragePath(*type);
}
RELEASE_ASSERT_NOT_REACHED();
}

String OriginStorageManager::originFileIdentifier()

0 comments on commit 832b6c0

Please sign in to comment.