Remove remaining GTK+ unused parameter warnings from WebKit2
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Mar 2014 17:20:58 +0000 (17:20 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Mar 2014 17:20:58 +0000 (17:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=130518

Reviewed by Sergio Villar Senin.

Fix almost all unused parameter warnings in the WebKit2GTK+ build.

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

15 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp
Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit2/NetworkProcess/SynchronousNetworkLoaderClient.cpp
Source/WebKit2/NetworkProcess/SynchronousNetworkLoaderClient.h
Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp
Source/WebKit2/UIProcess/API/APILoaderClient.h
Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitSecurityManager.cpp
Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp
Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp
Source/WebKit2/WebProcess/WebProcess.cpp

index 3ad0c85..2a5dcb7 100644 (file)
@@ -1,3 +1,12 @@
+2014-03-20  Martin Robinson  <mrobinson@igalia.com>
+
+        Remove remaining GTK+ unused parameter warnings from WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=130518
+
+        Reviewed by Sergio Villar Senin.
+
+        Fix almost all unused parameter warnings in the WebKit2GTK+ build.
+
 2014-03-20  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r165962.
index dcc62e9..7017d9e 100644 (file)
@@ -162,7 +162,7 @@ static NetworkStorageSession& storageSession(SessionID sessionID)
     return NetworkStorageSession::defaultStorageSession();
 }
 
-void NetworkConnectionToWebProcess::startDownload(SessionID sessionID, uint64_t downloadID, const ResourceRequest& request)
+void NetworkConnectionToWebProcess::startDownload(SessionID, uint64_t downloadID, const ResourceRequest& request)
 {
     // FIXME: Do something with the session ID.
     NetworkProcess::shared().downloadManager().startDownload(downloadID, request);
index c661700..fc52ed2 100644 (file)
@@ -191,7 +191,7 @@ void NetworkResourceLoader::didReceiveResponseAsync(ResourceHandle* handle, cons
     }
 }
 
-void NetworkResourceLoader::didReceiveData(ResourceHandle*, const char* data, unsigned length, int encodedDataLength)
+void NetworkResourceLoader::didReceiveData(ResourceHandle*, const char* /* data */, unsigned /* length */, int /* encodedDataLength */)
 {
     // The NetworkProcess should never get a didReceiveData callback.
     // We should always be using didReceiveBuffer.
@@ -328,7 +328,7 @@ void NetworkResourceLoader::didReceiveAuthenticationChallenge(ResourceHandle* ha
     NetworkProcess::shared().authenticationManager().didReceiveAuthenticationChallenge(m_webPageID, m_webFrameID, challenge);
 }
 
-void NetworkResourceLoader::didCancelAuthenticationChallenge(ResourceHandle* handle, const AuthenticationChallenge& challenge)
+void NetworkResourceLoader::didCancelAuthenticationChallenge(ResourceHandle* handle, const AuthenticationChallenge&)
 {
     ASSERT_UNUSED(handle, handle == m_handle);
 
@@ -336,7 +336,7 @@ void NetworkResourceLoader::didCancelAuthenticationChallenge(ResourceHandle* han
     notImplemented();
 }
 
-void NetworkResourceLoader::receivedCancellation(ResourceHandle* handle, const AuthenticationChallenge& challenge)
+void NetworkResourceLoader::receivedCancellation(ResourceHandle* handle, const AuthenticationChallenge&)
 {
     ASSERT_UNUSED(handle, handle == m_handle);
 
index 07b148c..5b618cb 100644 (file)
@@ -52,7 +52,7 @@ SynchronousNetworkLoaderClient::~SynchronousNetworkLoaderClient()
     ASSERT(!m_delayedReply);
 }
 
-void SynchronousNetworkLoaderClient::willSendRequest(NetworkResourceLoader* loader, ResourceRequest& proposedRequest, const ResourceResponse& redirectResponse)
+void SynchronousNetworkLoaderClient::willSendRequest(NetworkResourceLoader* loader, ResourceRequest& proposedRequest, const ResourceResponse& /* redirectResponse */)
 {
     // FIXME: This needs to be fixed to follow the redirect correctly even for cross-domain requests.
     // This includes at least updating host records, and comparing the current request instead of the original request here.
@@ -81,7 +81,7 @@ void SynchronousNetworkLoaderClient::didReceiveResponse(NetworkResourceLoader*,
     m_response = response;
 }
 
-void SynchronousNetworkLoaderClient::didReceiveBuffer(NetworkResourceLoader*, SharedBuffer* buffer, int encodedDataLength)
+void SynchronousNetworkLoaderClient::didReceiveBuffer(NetworkResourceLoader*, SharedBuffer* buffer, int /* encodedDataLength */)
 {
     // FIXME: There's a potential performance improvement here by preallocating a SharedMemory region
     // of the expected content length to avoid a copy when we send it to the WebProcess on completion.
index 9470678..b32d2ad 100644 (file)
@@ -55,7 +55,7 @@ private:
 #endif
     virtual void didReceiveResponse(NetworkResourceLoader*, const WebCore::ResourceResponse&) override;
     virtual void didReceiveBuffer(NetworkResourceLoader*, WebCore::SharedBuffer*, int encodedDataLength) override;
-    virtual void didSendData(NetworkResourceLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) override { }
+    virtual void didSendData(NetworkResourceLoader*, unsigned long long /* bytesSent */, unsigned long long /* totalBytesToBeSent */) override { }
     virtual void didFinishLoading(NetworkResourceLoader*, double finishTime) override;
     virtual void didFail(NetworkResourceLoader*, const WebCore::ResourceError&) override;
 
index 3be9dbc..6da4d68 100644 (file)
@@ -46,7 +46,7 @@ bool RemoteNetworkingContext::isValid() const
     return true;
 }
 
-void RemoteNetworkingContext::ensurePrivateBrowsingSession(SessionID sessionID)
+void RemoteNetworkingContext::ensurePrivateBrowsingSession(SessionID)
 {
     notImplemented();
 }
index fad116e..96c1181 100644 (file)
@@ -95,7 +95,7 @@ public:
     virtual void willGoToBackForwardListItem(WebKit::WebPageProxy*, WebKit::WebBackForwardListItem*, API::Object*) { }
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
-    virtual WebKit::PluginModuleLoadPolicy pluginLoadPolicy(WebKit::WebPageProxy*, WebKit::PluginModuleLoadPolicy currentPluginLoadPolicy, WebKit::ImmutableDictionary*, WTF::String& unavailabilityDescription) { return currentPluginLoadPolicy; }
+    virtual WebKit::PluginModuleLoadPolicy pluginLoadPolicy(WebKit::WebPageProxy*, WebKit::PluginModuleLoadPolicy currentPluginLoadPolicy, WebKit::ImmutableDictionary*, WTF::String& /* unavailabilityDescription */) { return currentPluginLoadPolicy; }
     virtual void didFailToInitializePlugin(WebKit::WebPageProxy*, WebKit::ImmutableDictionary*) { }
     virtual void didBlockInsecurePluginVersion(WebKit::WebPageProxy*, WebKit::ImmutableDictionary*) { }
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
index bc450f2..c27cc7a 100644 (file)
@@ -49,7 +49,7 @@ WKArrayRef WKOpenPanelParametersCopyAcceptedMIMETypes(WKOpenPanelParametersRef p
 }
 
 // Deprecated.
-WKStringRef WKOpenPanelParametersCopyCapture(WKOpenPanelParametersRef parametersRef)
+WKStringRef WKOpenPanelParametersCopyCapture(WKOpenPanelParametersRef)
 {
     return 0;
 }
index e8c36d7..061120c 100644 (file)
@@ -55,7 +55,7 @@ struct _WebKitSecurityManagerPrivate {
 
 WEBKIT_DEFINE_TYPE(WebKitSecurityManager, webkit_security_manager, G_TYPE_OBJECT)
 
-static void webkit_security_manager_class_init(WebKitSecurityManagerClass* klass)
+static void webkit_security_manager_class_init(WebKitSecurityManagerClass*)
 {
 }
 
index 067e30e..aa43d1c 100644 (file)
@@ -76,6 +76,8 @@ void NetworkProcessProxy::connectionWillOpen(IPC::Connection* connection)
 {
 #if ENABLE(SEC_ITEM_SHIM)
     SecItemShimProxy::shared().initializeConnection(connection);
+#else
+    UNUSED_PARAM(connection);
 #endif
 }
 
index b431832..1a498da 100644 (file)
@@ -1155,6 +1155,9 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
     if (!isValid())
         return;
 #if PLATFORM(GTK)
+    UNUSED_PARAM(dragStorageName);
+    UNUSED_PARAM(sandboxExtensionHandle);
+    UNUSED_PARAM(sandboxExtensionsForUpload);
     m_process->send(Messages::WebPage::PerformDragControllerAction(action, dragData), m_pageID);
 #else
     m_process->send(Messages::WebPage::PerformDragControllerAction(action, dragData.clientPosition(), dragData.globalPosition(), dragData.draggingSourceOperationMask(), dragStorageName, dragData.flags(), sandboxExtensionHandle, sandboxExtensionsForUpload), m_pageID);
@@ -1421,6 +1424,8 @@ bool WebPageProxy::shouldStartTrackingTouchEvents(const WebTouchEvent& touchStar
     }
 
     return false;
+#else
+    UNUSED_PARAM(touchStartEvent);
 #endif // ENABLE(ASYNC_SCROLLING)
     return true;
 }
index 47e673e..4d606b9 100644 (file)
@@ -622,12 +622,12 @@ PassRefPtr<Plugin> WebPage::createPlugin(WebFrame* frame, HTMLPlugInElement* plu
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
 
 #if ENABLE(WEBGL) && !PLATFORM(COCOA)
-WebCore::WebGLLoadPolicy WebPage::webGLPolicyForURL(WebFrame* frame, const String& url)
+WebCore::WebGLLoadPolicy WebPage::webGLPolicyForURL(WebFrame*, const String& /* url */)
 {
     return WebGLAllowCreation;
 }
 
-WebCore::WebGLLoadPolicy WebPage::resolveWebGLPolicyForURL(WebFrame* frame, const String& url)
+WebCore::WebGLLoadPolicy WebPage::resolveWebGLPolicyForURL(WebFrame*, const String& /* url */)
 {
     return WebGLAllowCreation;
 }
@@ -4319,7 +4319,7 @@ PassRefPtr<DocumentLoader> WebPage::createDocumentLoader(Frame& frame, const Res
     RefPtr<WebDocumentLoader> documentLoader = WebDocumentLoader::create(request, substituteData);
 
     if (m_pendingNavigationID) {
-        ASSERT(frame.isMainFrame());
+        ASSERT_UNUSED(frame, frame.isMainFrame());
 
         documentLoader->setNavigationID(m_pendingNavigationID);
         m_pendingNavigationID = 0;
index 34f0c12..2322435 100644 (file)
@@ -269,7 +269,7 @@ void LayerTreeHostGtk::setPageOverlayNeedsDisplay(PageOverlay* pageOverlay, cons
     scheduleLayerFlush();
 }
 
-void LayerTreeHostGtk::notifyAnimationStarted(const WebCore::GraphicsLayer*, double time)
+void LayerTreeHostGtk::notifyAnimationStarted(const WebCore::GraphicsLayer*, double /* time */)
 {
 }
 
index 79353e3..7b63e7e 100644 (file)
@@ -105,7 +105,7 @@ public:
         print(surface, 72, 72);
     }
 
-    void startPage(cairo_t* cr) override
+    void startPage(cairo_t*) override
     {
         if (!currentPageIsFirstPageOfSheet())
           return;
@@ -140,7 +140,7 @@ public:
             cairo_show_page(cr);
     }
 
-    static void printJobComplete(GtkPrintJob* printJob, WebPrintOperationGtkUnix* printOperation, const GError* error)
+    static void printJobComplete(GtkPrintJob*, WebPrintOperationGtkUnix* printOperation, const GError* error)
     {
         printOperation->printDone(error ? printError(printOperation->frameURL(), error->message) : WebCore::ResourceError());
         printOperation->m_printJob = 0;
index 1a18df2..59acd64 100644 (file)
@@ -985,7 +985,7 @@ NetworkProcessConnection* WebProcess::networkConnection()
 void WebProcess::networkProcessConnectionClosed(NetworkProcessConnection* connection)
 {
     ASSERT(m_networkProcessConnection);
-    ASSERT(m_networkProcessConnection == connection);
+    ASSERT_UNUSED(connection, m_networkProcessConnection == connection);
 
     m_networkProcessConnection = 0;