[webkit-changes] [WebKit/WebKit] c6e6ed: Fix warnings found by clang-17

Ryosuke Niwa noreply at github.com
Sun Feb 9 11:08:34 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c6e6edd8f8ffe23a73ffa5310eae5836dc35b680
      https://github.com/WebKit/WebKit/commit/c6e6edd8f8ffe23a73ffa5310eae5836dc35b680
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2025-02-09 (Sun, 09 Feb 2025)

  Changed paths:
    M Source/WTF/wtf/BitVector.h
    M Source/WTF/wtf/posix/ThreadingPOSIX.cpp
    M Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.h
    M Source/WebCore/accessibility/cocoa/AXCoreObjectCocoa.mm
    M Source/WebCore/page/scrolling/ScrollLatchingController.cpp
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm
    M Source/WebCore/platform/graphics/cocoa/CMUtilities.mm
    M Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.cpp
    M Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.mm
    M Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm
    M Source/WebGPU/WGSL/AttributeValidator.cpp
    M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
    M Source/WebGPU/WGSL/TypeCheck.cpp
    M Source/WebGPU/WebGPU/BindGroupLayout.mm
    M Source/WebGPU/WebGPU/RenderBundle.mm
    M Source/WebGPU/WebGPU/RenderBundleEncoder.mm
    M Source/WebGPU/WebGPU/RenderPipeline.mm
    M Source/WebKit/NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm
    M Source/WebKit/UIProcess/Extensions/Cocoa/_WKWebExtensionDeclarativeNetRequestRule.mm
    M Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIPermissionsCocoa.mm
    M Tools/TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp

  Log Message:
  -----------
  Fix warnings found by clang-17
https://bugs.webkit.org/show_bug.cgi?id=287329

Reviewed by Geoffrey Garen.

Fixed all the warnings newly found by clang-17. Most of them are warnings about a variable
which is set but never used.

MediaPlayerPrivateAVFoundationObjC.mm has code change to explicitly initialize each optional
member variable with std::nullopt. This shouldn't be necessary in theory but included here
to make clang-17 happy.

* Source/WTF/wtf/BitVector.h:
* Source/WTF/wtf/posix/ThreadingPOSIX.cpp:
(WTF::Thread::setThreadTimeConstraints):
* Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.h:
(PAL::CMBlockBufferGetDataSpan):
* Source/WebCore/accessibility/cocoa/AXCoreObjectCocoa.mm:
(WebCore::attributedStringSetElement):
* Source/WebCore/page/scrolling/ScrollLatchingController.cpp:
(WebCore::ScrollLatchingController::removeLatchingStateForFrame):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
(WebCore::MediaSampleAVFObjC::commonInit):
* Source/WebCore/platform/graphics/cocoa/CMUtilities.mm:
(WebCore::toCMSampleBuffer):
* Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.cpp:
(WebCore::CoreAudioSharedUnit::validateOutputDevice):
* Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.mm:
(WebCore::CoreAudioSharedInternalUnit::setVoiceActivityDetection):
* Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSessionDataTask initWithSession:identifier:request:targetDispatcher:]):
* Source/WebGPU/WGSL/AttributeValidator.cpp:
(WGSL::AttributeValidator::validateStructIO):
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::storeInitialValue):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::analyze):
* Source/WebGPU/WebGPU/BindGroupLayout.mm:
(WebGPU::Device::createBindGroupLayout):
* Source/WebGPU/WebGPU/RenderBundle.mm:
(WebGPU::RenderBundle::validateRenderPass const):
* Source/WebGPU/WebGPU/RenderBundleEncoder.mm:
(WebGPU::RenderBundleEncoder::drawIndexedIndirect):
(WebGPU::RenderBundleEncoder::drawIndirect):
(WebGPU::RenderBundleEncoder::setPipeline):
(WebGPU::RenderBundleEncoder::setVertexBuffer):
* Source/WebGPU/WebGPU/RenderPipeline.mm:
(WebGPU::RenderPipeline::colorDepthStencilTargetsMatch const):
* Source/WebKit/NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm:
(WebKit::isNat64IPAddress):
* Source/WebKit/UIProcess/Extensions/Cocoa/_WKWebExtensionDeclarativeNetRequestRule.mm:
* Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIPermissionsCocoa.mm:
(WebKit::WebExtensionAPIPermissions::verifyRequestedPermissions):
* Tools/TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp:
(TestWebKitAPI::TEST(BifurcatedGraphicsContextTests, Text)):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list