Fix many warnings with Clang 7.0 on GTK x86-64 in Debug.
authorcturner@igalia.com <cturner@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2020 15:17:17 +0000 (15:17 +0000)
committercturner@igalia.com <cturner@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2020 15:17:17 +0000 (15:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=209146

Reviewed by Darin Adler.

Source/JavaScriptCore:

* runtime/JSCellInlines.h:
(JSC::CallFrame::deprecatedVM const): A reference may not be NULL, so
this ASSERT() can never trip.

Source/WebCore:

Warning fixes, no new tests.

* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::MediaKeys):
* Modules/webaudio/MediaStreamAudioSource.h: The m_numberOfFrames ivar
is platform-specific.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGLData::getStaticVBO):
* platform/mediastream/RealtimeVideoSource.h:
* platform/mediastream/gstreamer/GStreamerAudioCapturer.h: There are
still virtual methods in this class, but no virtual destructor. Since
this won't be subclassed further (I doubt, anyway!) lets make it final
and plug the bug.
* platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
* platform/mediastream/gstreamer/GStreamerVideoCapturer.h: See
AudioCapturer.
* platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
(WebCore::GStreamerVideoDecoder::RegisterDecodeCompleteCallback): Deleted.
(WebCore::GStreamerVideoDecoder::ImplementationName const): Deleted.
* platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp:
* platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: The
encoder was being used uninitialized, and hence codec support can not
be working as intended. Fix that bug.
(WebCore::GStreamerVideoEncoder::AddCodecIfSupported):
(WebCore::GStreamerVideoEncoder::InitEncode): Deleted.
(WebCore::GStreamerVideoEncoder::GetEncoderInfo const): Deleted.
* platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.h:
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::setCookies):
* rendering/RenderLayerBacking.h: Condition the bear trap on Cocoa
platform where the crash is being seen. On GTK these traps generate
warning spam and we don't see the crash here.
* rendering/RenderThemeAdwaita.h:
* testing/Internals.cpp:
(WebCore::Internals::readPreferenceInteger):
(WebCore::Internals::encodedPreferenceValue):
(WebCore::Internals::getUTIFromMIMEType):
(WebCore::Internals::getUTIFromTag):

Source/WebDriver:

* Session.cpp:
(WebDriver::Session::newWindow):
(WebDriver::Session::elementIsFileUpload):
(WebDriver::Session::elementIsEditable):
(WebDriver::Session::setInputFileUploadFiles):

Source/WebKit:

* NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
(WebKit::NetworkHTTPSUpgradeChecker::query):
* NetworkProcess/NetworkLoadChecker.cpp: The m_isHTTPSUpgradeEnabled
ivar is only used on Cocoa platforms, on GTK it is causing warning
spam.
(WebKit::NetworkLoadChecker::NetworkLoadChecker):
* NetworkProcess/NetworkLoadChecker.h:
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::updateSceneState):
*
Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
m_inForceRepaint is not being used anymore.
(WebKit::ThreadedCompositor::forceRepaint):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* UIProcess/API/glib/WebKitNavigationClient.cpp:
* UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
(WebKit::RemoteInspectorProtocolHandler::RemoteInspectorProtocolHandler):
* UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.h:

Source/WTF:

* wtf/LoggerHelper.h: When the RELEASE_LOG is disabled, avoid warning
spam about unused channel names. Call sites often create locals for
the channel name outside of RELEASE_LOG ifdef's, which cause many
unused variable warnings.

Tools:

* TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:
* TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp:
(testDownloadMIMEType):
(testContextMenuDownloadActions):
* TestWebKitAPI/Tests/WebKitGtk/TestPrinting.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258698 268f45cc-cd09-0410-ab3c-d52691b4dbfc

38 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSCellInlines.h
Source/WTF/ChangeLog
Source/WTF/wtf/LoggerHelper.h
Source/WebCore/ChangeLog
Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp
Source/WebCore/Modules/webaudio/MediaStreamAudioSource.h
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
Source/WebCore/platform/mediastream/RealtimeVideoSource.h
Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCapturer.h
Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp
Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCapturer.h
Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp
Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp
Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp
Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.h
Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp
Source/WebCore/rendering/RenderLayerBacking.h
Source/WebCore/rendering/RenderThemeAdwaita.h
Source/WebCore/testing/Internals.cpp
Source/WebDriver/ChangeLog
Source/WebDriver/Session.cpp
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/NetworkHTTPSUpgradeChecker.cpp
Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp
Source/WebKit/NetworkProcess/NetworkLoadChecker.h
Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h
Source/WebKit/UIProcess/API/glib/WebKitNavigationClient.cpp
Source/WebKit/UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp
Source/WebKit/UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp
Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp
Tools/TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp
Tools/TestWebKitAPI/Tests/WebKitGtk/TestPrinting.cpp

index 2776e8d..7c10ee8 100644 (file)
@@ -1,3 +1,14 @@
+2020-03-19  Charlie Turner  <cturner@igalia.com>
+
+        Fix many warnings with Clang 7.0 on GTK x86-64 in Debug.
+        https://bugs.webkit.org/show_bug.cgi?id=209146
+
+        Reviewed by Darin Adler.
+
+        * runtime/JSCellInlines.h:
+        (JSC::CallFrame::deprecatedVM const): A reference may not be NULL, so
+        this ASSERT() can never trip.
+
 2020-03-18  Yusuke Suzuki  <ysuzuki@apple.com>
 
         Add a way to mark a rejected promise as handled
index 2daf7bc..1c9d132 100644 (file)
@@ -142,7 +142,6 @@ ALWAYS_INLINE VM& CallFrame::deprecatedVM() const
 {
     JSCell* callee = this->callee().asCell();
     ASSERT(callee);
-    ASSERT(&callee->vm());
     return callee->vm();
 }
 
index dd602b4..6321f88 100644 (file)
@@ -1,3 +1,15 @@
+2020-03-19  Charlie Turner  <cturner@igalia.com>
+
+        Fix many warnings with Clang 7.0 on GTK x86-64 in Debug.
+        https://bugs.webkit.org/show_bug.cgi?id=209146
+
+        Reviewed by Darin Adler.
+
+        * wtf/LoggerHelper.h: When the RELEASE_LOG is disabled, avoid warning
+        spam about unused channel names. Call sites often create locals for
+        the channel name outside of RELEASE_LOG ifdef's, which cause many
+        unused variable warnings.
+
 2020-03-19  Philippe Normand  <pnormand@igalia.com>
 
         [GTK][WPE] Unreviewed, build fixes after r258547 when disabling release logging support
index 9eb73ba..542c234 100644 (file)
@@ -89,14 +89,13 @@ public:
 
 #define LOGIDENTIFIER (WTF::nullopt)
 
-#define ALWAYS_LOG(...)     ((void)0)
-#define ERROR_LOG(...)      ((void)0)
-#define ERROR_LOG(...)      ((void)0)
-#define WARNING_LOG(...)    ((void)0)
-#define NOTICE_LOG(...)     ((void)0)
-#define INFO_LOG(...)       ((void)0)
-#define DEBUG_LOG(...)      ((void)0)
-#define WILL_LOG(_level_)   false
+#define ALWAYS_LOG(channelName, ...)  (UNUSED_PARAM(channelName))
+#define ERROR_LOG(channelName, ...)   (UNUSED_PARAM(channelName))
+#define WARNING_LOG(channelName, ...) (UNUSED_PARAM(channelName))
+#define NOTICE_LOG(channelName, ...)  (UNUSED_PARAM(channelName))
+#define INFO_LOG(channelName, ...)    (UNUSED_PARAM(channelName))
+#define DEBUG_LOG(channelName, ...)   (UNUSED_PARAM(channelName))
+#define WILL_LOG(_level_)    false
 
 #define ALWAYS_LOG_IF(condition, ...)     ((void)0)
 #define ERROR_LOG_IF(condition, ...)      ((void)0)
index d5bfd26..a479508 100644 (file)
@@ -1,3 +1,51 @@
+2020-03-19  Charlie Turner  <cturner@igalia.com>
+
+        Fix many warnings with Clang 7.0 on GTK x86-64 in Debug.
+        https://bugs.webkit.org/show_bug.cgi?id=209146
+
+        Reviewed by Darin Adler.
+
+        Warning fixes, no new tests.
+
+        * Modules/encryptedmedia/MediaKeys.cpp:
+        (WebCore::MediaKeys::MediaKeys):
+        * Modules/webaudio/MediaStreamAudioSource.h: The m_numberOfFrames ivar
+        is platform-specific.
+        * loader/cache/CachedResource.cpp:
+        (WebCore::CachedResource::load):
+        * platform/graphics/texmap/TextureMapperGL.cpp:
+        (WebCore::TextureMapperGLData::getStaticVBO):
+        * platform/mediastream/RealtimeVideoSource.h:
+        * platform/mediastream/gstreamer/GStreamerAudioCapturer.h: There are
+        still virtual methods in this class, but no virtual destructor. Since
+        this won't be subclassed further (I doubt, anyway!) lets make it final
+        and plug the bug.
+        * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
+        * platform/mediastream/gstreamer/GStreamerVideoCapturer.h: See
+        AudioCapturer.
+        * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
+        (WebCore::GStreamerVideoDecoder::RegisterDecodeCompleteCallback): Deleted.
+        (WebCore::GStreamerVideoDecoder::ImplementationName const): Deleted.
+        * platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp:
+        * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: The
+        encoder was being used uninitialized, and hence codec support can not
+        be working as intended. Fix that bug.
+        (WebCore::GStreamerVideoEncoder::AddCodecIfSupported):
+        (WebCore::GStreamerVideoEncoder::InitEncode): Deleted.
+        (WebCore::GStreamerVideoEncoder::GetEncoderInfo const): Deleted.
+        * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.h:
+        * platform/network/soup/NetworkStorageSessionSoup.cpp:
+        (WebCore::NetworkStorageSession::setCookies):
+        * rendering/RenderLayerBacking.h: Condition the bear trap on Cocoa
+        platform where the crash is being seen. On GTK these traps generate
+        warning spam and we don't see the crash here.
+        * rendering/RenderThemeAdwaita.h:
+        * testing/Internals.cpp:
+        (WebCore::Internals::readPreferenceInteger):
+        (WebCore::Internals::encodedPreferenceValue):
+        (WebCore::Internals::getUTIFromMIMEType):
+        (WebCore::Internals::getUTIFromTag):
+
 2020-03-19  Antoine Quint  <graouts@apple.com>
 
         onwebkit{animation, transition}XX handlers missing from Document
index a89cd40..c4b6984 100644 (file)
@@ -63,6 +63,8 @@ MediaKeys::MediaKeys(Document& document, bool useDistinctiveIdentifier, bool per
 {
 #if !RELEASE_LOG_DISABLED
     m_instance->setLogger(document.logger(), m_logIdentifier);
+#else
+    UNUSED_PARAM(document);
 #endif
     m_instance->setClient(makeWeakPtr(this));
 }
index fc6ddb8..1672681 100644 (file)
@@ -58,7 +58,9 @@ private:
 
     String m_deviceId;
     RealtimeMediaSourceSettings m_currentSettings;
+#if USE(AVFOUNDATION)
     size_t m_numberOfFrames { 0 };
+#endif
 };
 
 } // namespace WebCore
index 5d86af6..23e6ff3 100644 (file)
@@ -330,8 +330,7 @@ void CachedResource::load(CachedResourceLoader& cachedResourceLoader)
     platformStrategies()->loaderStrategy()->loadResource(frame, *this, WTFMove(request), m_options, [this, protectedThis = CachedResourceHandle<CachedResource>(this), frameRef = makeRef(frame), loggingAllowed = cachedResourceLoader.isAlwaysOnLoggingAllowed()] (RefPtr<SubresourceLoader>&& loader) {
         m_loader = WTFMove(loader);
         if (!m_loader) {
-            auto& frame = frameRef.get();
-            RELEASE_LOG_IF(loggingAllowed, Network, "%p - [pageID=%" PRIu64 ", frameID=%" PRIu64 "] CachedResource::load: Unable to create SubresourceLoader", this, PAGE_ID(frame), FRAME_ID(frame));
+            RELEASE_LOG_IF(loggingAllowed, Network, "%p - [pageID=%" PRIu64 ", frameID=%" PRIu64 "] CachedResource::load: Unable to create SubresourceLoader", this, PAGE_ID(frameRef.get()), FRAME_ID(frameRef.get()));
             failBeforeStarting();
             return;
         }
index 96e3043..fba1120 100644 (file)
@@ -150,7 +150,7 @@ void TextureMapperGLData::initializeStencil()
 GLuint TextureMapperGLData::getStaticVBO(GLenum target, GLsizeiptr size, const void* data)
 {
     auto addResult = m_vbos.ensure(data,
-        [this, target, size, data] {
+        [target, size, data] {
             GLuint vbo = 0;
             glGenBuffers(1, &vbo);
             glBindBuffer(target, vbo);
index 3b61bc9..b07be60 100644 (file)
@@ -70,7 +70,9 @@ private:
 
     Ref<RealtimeVideoCaptureSource> m_source;
     RealtimeMediaSourceSettings m_currentSettings;
+#if !RELEASE_LOG_DISABLED
     uint64_t m_cloneCounter { 0 };
+#endif
 };
 
 } // namespace WebCore
index 9aaf761..dc7f28f 100644 (file)
@@ -27,7 +27,7 @@
 
 namespace WebCore {
 
-class GStreamerAudioCapturer : public GStreamerCapturer {
+class GStreamerAudioCapturer final : public GStreamerCapturer {
 public:
     GStreamerAudioCapturer(GStreamerCaptureDevice);
     GStreamerAudioCapturer();
index ac988e4..87a08f2 100644 (file)
@@ -38,9 +38,6 @@
 
 namespace WebCore {
 
-const static int defaultWidth = 640;
-const static int defaultHeight = 480;
-
 GST_DEBUG_CATEGORY(webkit_video_capture_source_debug);
 #define GST_CAT_DEFAULT webkit_video_capture_source_debug
 
index 57b0b46..446028d 100644 (file)
@@ -29,7 +29,7 @@
 
 namespace WebCore {
 
-class GStreamerVideoCapturer : public GStreamerCapturer {
+class GStreamerVideoCapturer final : public GStreamerCapturer {
 public:
     GStreamerVideoCapturer(GStreamerCaptureDevice);
     GStreamerVideoCapturer(const char* source_factory);
index a3bdd6b..5346e2e 100644 (file)
@@ -165,7 +165,7 @@ public:
         return WEBRTC_VIDEO_CODEC_OK;
     }
 
-    int32_t RegisterDecodeCompleteCallback(webrtc::DecodedImageCallback* callback)
+    int32_t RegisterDecodeCompleteCallback(webrtc::DecodedImageCallback* callback) override
     {
         m_imageReadyCb = callback;
 
@@ -320,7 +320,7 @@ public:
 
     virtual const gchar* Caps() = 0;
     virtual webrtc::VideoCodecType CodecType() = 0;
-    const char* ImplementationName() const { return "GStreamer"; }
+    const char* ImplementationName() const override { return "GStreamer"; }
     virtual const gchar* Name() = 0;
 
 protected:
@@ -336,7 +336,6 @@ private:
     GstElement* m_sink;
     GstElement* m_src;
 
-    GstVideoInfo m_info;
     webrtc::DecodedImageCallback* m_imageReadyCb;
 
     StdMap<GstClockTime, InputTimestamps> m_dtsPtsMap;
index 42f0cf8..6a1d4a7 100644 (file)
@@ -67,17 +67,7 @@ typedef enum
   ENCODER_LAST,
 } EncoderId;
 
-EncoderDefinition encoders[ENCODER_LAST] = {
-  FALSE,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-};
+EncoderDefinition encoders[ENCODER_LAST] = { { } };
 
 typedef struct
 {
index a2fdda5..0a5dd9c 100644 (file)
@@ -100,7 +100,7 @@ public:
         return elem;
     }
 
-    int32_t InitEncode(const webrtc::VideoCodec* codecSettings, int32_t, size_t)
+    int32_t InitEncode(const webrtc::VideoCodec* codecSettings, int32_t, size_t) override
     {
         g_return_val_if_fail(codecSettings, WEBRTC_VIDEO_CODEC_ERR_PARAMETER);
         g_return_val_if_fail(codecSettings->codecType == CodecType(), WEBRTC_VIDEO_CODEC_ERR_PARAMETER);
@@ -188,7 +188,8 @@ public:
         }
     }
 
-    VideoEncoder::EncoderInfo GetEncoderInfo() const {
+    VideoEncoder::EncoderInfo GetEncoderInfo() const override
+    {
         EncoderInfo info;
         info.supports_native_handle = false;
         info.implementation_name = "GStreamer";
@@ -298,10 +299,8 @@ public:
 
     void AddCodecIfSupported(std::vector<webrtc::SdpVideoFormat>* supportedFormats)
     {
-        GstElement* encoder;
-
-        if (createEncoder().get() != nullptr) {
-            webrtc::SdpVideoFormat format = ConfigureSupportedCodec(encoder);
+        if (auto encoder = createEncoder()) {
+            webrtc::SdpVideoFormat format = ConfigureSupportedCodec(encoder.get());
 
             supportedFormats->push_back(format);
         }
index 1483a2b..1eac197 100644 (file)
@@ -35,7 +35,7 @@ public:
 private:
     std::vector<webrtc::SdpVideoFormat> GetSupportedFormats() const override;
     std::unique_ptr<webrtc::VideoEncoder> CreateVideoEncoder(const webrtc::SdpVideoFormat&) final;
-    CodecInfo QueryVideoEncoder(const webrtc::SdpVideoFormat&) const
+    CodecInfo QueryVideoEncoder(const webrtc::SdpVideoFormat&) const override
     {
         GST_FIXME("Detect wether the decoder is HW accelerated");
 
index 4fdbbab..00015a2 100644 (file)
@@ -317,6 +317,8 @@ void NetworkStorageSession::setCookies(const Vector<Cookie>& cookies, const URL&
 
         soup_cookie_jar_add_cookie_full(cookieStorage(), cookie.toSoupCookie(), origin.get(), firstPartyURI.get());
 #else
+        UNUSED_PARAM(url);
+        UNUSED_PARAM(firstParty);
         soup_cookie_jar_add_cookie(cookieStorage(), cookie.toSoupCookie());
 #endif
     }
index 8fc6504..9575e33 100644 (file)
@@ -43,7 +43,7 @@ class TiledBacking;
 class TransformationMatrix;
 
 
-#if __WORDSIZE == 64
+#if __WORDSIZE == 64 && PLATFORM(COCOA)
 #define USE_OWNING_LAYER_BEAR_TRAP 1
 #define BEAR_TRAP_VALUE 0xEEEEEEEEEEEEEEEE
 #else
index ec6840d..3fb6d8d 100644 (file)
@@ -62,8 +62,8 @@ private:
     bool paintSearchField(const RenderObject&, const PaintInfo&, const IntRect&) final;
 
     bool popsMenuBySpaceOrReturn() const final { return true; }
-    void adjustMenuListStyle(RenderStyle&, const Element*) const;
-    void adjustMenuListButtonStyle(RenderStyle&, const Element*) const;
+    void adjustMenuListStyle(RenderStyle&, const Element*) const override;
+    void adjustMenuListButtonStyle(RenderStyle&, const Element*) const override;
     LengthBox popupInternalPaddingBox(const RenderStyle&) const final;
     bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) final;
     bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) final;
index f54bb89..d81981f 100644 (file)
@@ -5518,24 +5518,18 @@ int Internals::readPreferenceInteger(const String& domain, const String& key)
 }
 
 #if !PLATFORM(COCOA)
-String Internals::encodedPreferenceValue(const String& domain, const String& key)
+String Internals::encodedPreferenceValue(const String&, const String&)
 {
-    UNUSED_PARAM(domain);
-    UNUSED_PARAM(key);
     return emptyString();
 }
 
-String Internals::getUTIFromMIMEType(const String& mimeType)
+String Internals::getUTIFromMIMEType(const String&)
 {
-    UNUSED_PARAM(mimeType);
     return emptyString();
 }
 
-String Internals::getUTIFromTag(const String& tagClass, const String& tag, const String& conformingToUTI)
+String Internals::getUTIFromTag(const String&, const String&, const String&)
 {
-    UNUSED_PARAM(tagClass);
-    UNUSED_PARAM(tag);
-    UNUSED_PARAM(conformingToUTI);
     return emptyString();
 }
 
index 43cdbd0..a5e825d 100644 (file)
@@ -1,3 +1,16 @@
+2020-03-19  Charlie Turner  <cturner@igalia.com>
+
+        Fix many warnings with Clang 7.0 on GTK x86-64 in Debug.
+        https://bugs.webkit.org/show_bug.cgi?id=209146
+
+        Reviewed by Darin Adler.
+
+        * Session.cpp:
+        (WebDriver::Session::newWindow):
+        (WebDriver::Session::elementIsFileUpload):
+        (WebDriver::Session::elementIsEditable):
+        (WebDriver::Session::setInputFileUploadFiles):
+
 2020-02-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
 
         WebDriver: return invalidSessionID exception if the WebProcess doesn't respond (crashes)
index 9fb4027..4785a26 100644 (file)
@@ -608,7 +608,7 @@ void Session::newWindow(Optional<String> typeHint, Function<void (CommandResult&
             parameters = JSON::Object::create();
             parameters->setString("presentationHint"_s, typeHint.value() == "window" ? "Window"_s : "Tab"_s);
         }
-        m_host->sendCommandToBackend("createBrowsingContext"_s, WTFMove(parameters), [this, protectedThis = protectedThis.copyRef(), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) {
+        m_host->sendCommandToBackend("createBrowsingContext"_s, WTFMove(parameters), [protectedThis = protectedThis.copyRef(), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) {
             if (response.isError || !response.responseObject) {
                 completionHandler(CommandResult::fail(WTFMove(response.responseObject)));
                 return;
@@ -1550,7 +1550,7 @@ void Session::elementIsFileUpload(const String& elementID, Function<void (Comman
         parameters->setString("frameHandle"_s, m_currentBrowsingContext.value());
     parameters->setString("function"_s, isFileUploadScript);
     parameters->setArray("arguments"_s, WTFMove(arguments));
-    m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) {
+    m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) {
         if (response.isError || !response.responseObject) {
             completionHandler(CommandResult::fail(WTFMove(response.responseObject)));
             return;
@@ -1692,7 +1692,7 @@ void Session::elementIsEditable(const String& elementID, Function<void (CommandR
         parameters->setString("frameHandle"_s, m_currentBrowsingContext.value());
     parameters->setString("function"_s, isEditableScript);
     parameters->setArray("arguments"_s, WTFMove(arguments));
-    m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) {
+    m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) {
         if (response.isError || !response.responseObject) {
             completionHandler(CommandResult::fail(WTFMove(response.responseObject)));
             return;
@@ -1794,7 +1794,7 @@ void Session::setInputFileUploadFiles(const String& elementID, const String& tex
     parameters->setString("frameHandle"_s, m_currentBrowsingContext.valueOr(emptyString()));
     parameters->setString("nodeHandle"_s, elementID);
     parameters->setArray("filenames"_s, WTFMove(filenames));
-    m_host->sendCommandToBackend("setFilesForInputFileUpload"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), elementID, completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable {
+    m_host->sendCommandToBackend("setFilesForInputFileUpload"_s, WTFMove(parameters), [protectedThis = makeRef(*this), elementID, completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable {
         if (response.isError) {
             completionHandler(CommandResult::fail(WTFMove(response.responseObject)));
             return;
index 9c75b3a..6e5dc73 100644 (file)
@@ -1,3 +1,29 @@
+2020-03-19  Charlie Turner  <cturner@igalia.com>
+
+        Fix many warnings with Clang 7.0 on GTK x86-64 in Debug.
+        https://bugs.webkit.org/show_bug.cgi?id=209146
+
+        Reviewed by Darin Adler.
+
+        * NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
+        (WebKit::NetworkHTTPSUpgradeChecker::query):
+        * NetworkProcess/NetworkLoadChecker.cpp: The m_isHTTPSUpgradeEnabled
+        ivar is only used on Cocoa platforms, on GTK it is causing warning
+        spam.
+        (WebKit::NetworkLoadChecker::NetworkLoadChecker):
+        * NetworkProcess/NetworkLoadChecker.h:
+        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
+        (WebKit::CoordinatedGraphicsScene::updateSceneState):
+        *
+        Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
+        m_inForceRepaint is not being used anymore.
+        (WebKit::ThreadedCompositor::forceRepaint):
+        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
+        * UIProcess/API/glib/WebKitNavigationClient.cpp:
+        * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
+        (WebKit::RemoteInspectorProtocolHandler::RemoteInspectorProtocolHandler):
+        * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.h:
+
 2020-03-19  youenn fablet  <youenn@apple.com>
 
         Make URL::path() return a StringView
index d629660..a42eb7c 100644 (file)
@@ -112,6 +112,8 @@ void NetworkHTTPSUpgradeChecker::query(String&& host, PAL::SessionID sessionID,
         if (stepResult != SQLITE_ROW && stepResult != SQLITE_DONE) {
 #if PLATFORM(COCOA)
             RELEASE_LOG_ERROR_IF_ALLOWED(sessionID, "step failed with error code %d, error message: %{public}s, database path: %{public}s", stepResult, m_database->lastErrorMsg(), networkHTTPSUpgradeCheckerDatabasePath().utf8().data());
+#else
+            UNUSED_VARIABLE(sessionID);
 #endif
             ASSERT_NOT_REACHED();
             RunLoop::main().dispatch([callback = WTFMove(callback)] () mutable {
index 6edc251..9e0b682 100644 (file)
@@ -62,11 +62,17 @@ NetworkLoadChecker::NetworkLoadChecker(NetworkProcess& networkProcess, NetworkRe
     , m_preflightPolicy(preflightPolicy)
     , m_referrer(WTFMove(referrer))
     , m_shouldCaptureExtraNetworkLoadMetrics(shouldCaptureExtraNetworkLoadMetrics)
+#if PLATFORM(COCOA)
     , m_isHTTPSUpgradeEnabled(isHTTPSUpgradeEnabled)
+#endif
     , m_requestLoadType(requestLoadType)
     , m_schemeRegistry(schemeRegistry)
     , m_networkResourceLoader(makeWeakPtr(networkResourceLoader))
 {
+#if !PLATFORM(COCOA)
+    UNUSED_PARAM(isHTTPSUpgradeEnabled);
+#endif
+
     m_isSameOriginRequest = isSameOrigin(m_url, m_origin.get());
     switch (options.credentials) {
     case FetchOptions::Credentials::Include:
index 9e4dcb0..4d9ca96 100644 (file)
@@ -153,7 +153,11 @@ private:
     String m_referrer;
     bool m_checkContentExtensions { false };
     bool m_shouldCaptureExtraNetworkLoadMetrics { false };
+
+#if PLATFORM(COCOA)
     bool m_isHTTPSUpgradeEnabled { false };
+#endif
+
     WebCore::NetworkLoadInformation m_loadInformation;
 
     LoadType m_requestLoadType;
index e8dbbe2..a73dd43 100644 (file)
@@ -271,7 +271,7 @@ void CoordinatedGraphicsScene::updateSceneState()
             for (auto& compositionLayer : m_nicosia.state.layers) {
                 auto& layer = texmapLayer(*compositionLayer);
                 compositionLayer->commitState(
-                    [this, &layer, &compositionLayer, &layersByBacking]
+                    [&layer, &layersByBacking]
                     (const Nicosia::CompositionLayer::LayerState& layerState)
                     {
                         if (layerState.delta.positionChanged)
index bcb2359..b8c7303 100644 (file)
@@ -167,7 +167,6 @@ void ThreadedCompositor::forceRepaint()
     // in a way that doesn't starve out the underlying graphics buffers.
 #if PLATFORM(GTK) && !USE(WPE_RENDERER)
     m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this)] {
-        SetForScope<bool> change(m_inForceRepaint, true);
         renderLayerTree();
     });
 #endif
index 490640d..fcd2e48 100644 (file)
@@ -101,7 +101,6 @@ private:
 
     uint64_t m_nativeSurfaceHandle;
     WebCore::TextureMapper::PaintFlags m_paintFlags { 0 };
-    bool m_inForceRepaint { false };
     unsigned m_suspendedCount { 0 };
 
     std::unique_ptr<CompositingRunLoop> m_compositingRunLoop;
index 54ef0b4..7876443 100644 (file)
@@ -123,6 +123,7 @@ private:
             return true;
         case ProcessTerminationReason::ExceededCPULimit:
         case ProcessTerminationReason::RequestedByClient:
+        case ProcessTerminationReason::RequestedByNetworkProcess:
         case ProcessTerminationReason::NavigationSwap:
             break;
         }
index e3f4f85..b6551ea 100644 (file)
@@ -60,7 +60,6 @@ private:
 };
 
 RemoteInspectorProtocolHandler::RemoteInspectorProtocolHandler(WebKitWebContext* context)
-    : m_context(context)
 {
     webkit_web_context_register_uri_scheme(context, "inspector", [](WebKitURISchemeRequest* request, gpointer userData) {
         static_cast<RemoteInspectorProtocolHandler*>(userData)->handleRequest(request);
index c4873e7..f6a0d01 100644 (file)
@@ -49,7 +49,6 @@ private:
     void targetListChanged(RemoteInspectorClient&) override;
     void connectionClosed(RemoteInspectorClient&) override;
 
-    WebKitWebContext* m_context { nullptr };
     HashMap<String, std::unique_ptr<RemoteInspectorClient>> m_inspectorClients;
     HashSet<WebKitUserContentManager*> m_userContentManagers;
     HashSet<WebKitWebView*> m_webViews;
index aefed50..f2870a9 100644 (file)
@@ -1,3 +1,18 @@
+2020-03-19  Charlie Turner  <cturner@igalia.com>
+
+        Fix many warnings with Clang 7.0 on GTK x86-64 in Debug.
+        https://bugs.webkit.org/show_bug.cgi?id=209146
+
+        Reviewed by Darin Adler.
+
+        * TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp:
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:
+        * TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp:
+        (testDownloadMIMEType):
+        (testContextMenuDownloadActions):
+        * TestWebKitAPI/Tests/WebKitGtk/TestPrinting.cpp:
+
 2020-03-19  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK][WPE] REGRESSION(r258626): flatpak is used even when WEBKIT_JHBUILD is set
index 197d213..afadbc5 100644 (file)
@@ -1239,6 +1239,8 @@ TEST(TransformationMatrix, Casting)
     EXPECT_DOUBLE_EQ(3.0, caFromWK.m42);
     EXPECT_DOUBLE_EQ(2.0, caFromWK.m43);
     EXPECT_DOUBLE_EQ(1.0, caFromWK.m44);
+#else
+    UNUSED_VARIABLE(test);
 #endif
 
 #if USE(CG)
index cdab4ae..5ae44d4 100644 (file)
@@ -62,7 +62,6 @@ public:
 
     void setConnection(Ref<SocketConnection>&& connection)
     {
-        g_assert_true(connection.ptr());
         m_connection = WTFMove(connection);
         g_main_loop_quit(m_mainLoop.get());
     }
index e039199..f733e81 100644 (file)
@@ -672,14 +672,14 @@ static void testDownloadMIMEType(DownloadTest* test, gconstpointer)
     events.clear();
 
     WebKitURIRequest* request = webkit_download_get_request(download.get());
-    WEBKIT_IS_URI_REQUEST(request);
+    g_assert_true(WEBKIT_IS_URI_REQUEST(request));
     ASSERT_CMP_CSTRING(webkit_uri_request_get_uri(request), ==, kServer->getURIForPath("/unknown"));
 
     auto headers = webkit_uri_request_get_http_headers(request);
     g_assert_nonnull(soup_message_headers_get_one(headers, "User-Agent"));
 
     WebKitURIResponse* response = webkit_download_get_response(download.get());
-    WEBKIT_IS_URI_RESPONSE(response);
+    g_assert_true(WEBKIT_IS_URI_RESPONSE(response));
     g_assert_cmpstr(webkit_uri_response_get_mime_type(response), ==, "application/pdf");
 
     g_assert_nonnull(webkit_download_get_destination(download.get()));
@@ -739,7 +739,7 @@ static void testContextMenuDownloadActions(WebViewDownloadTest* test, gconstpoin
     g_assert_true(test->m_webView == webkit_download_get_web_view(test->m_download.get()));
 
     WebKitURIRequest* request = webkit_download_get_request(test->m_download.get());
-    WEBKIT_IS_URI_REQUEST(request);
+    g_assert_true(WEBKIT_IS_URI_REQUEST(request));
     ASSERT_CMP_CSTRING(webkit_uri_request_get_uri(request), ==, kServer->getURIForPath("/test.pdf"));
 
     auto headers = webkit_uri_request_get_http_headers(request);
index 548a981..70f709d 100644 (file)
@@ -118,7 +118,7 @@ public:
     }
 
     GRefPtr<WebKitPrintOperation> m_printOperation;
-    unsigned m_expectedError;
+    int m_expectedError;
 };
 
 static void testPrintOperationPrint(PrintTest* test, gconstpointer)