Skip to content
Permalink
Browse files
[curl] Fix unused variable/parameter warnings
https://bugs.webkit.org/show_bug.cgi?id=118050

Patch by Peter Gal <galpeter@inf.u-szeged.hu> on 2013-06-27
Reviewed by Christophe Dumez.

Commented out unused parameters and removed an unused variable in the curl backend.

No tests required.

* platform/network/curl/CredentialStorageCurl.cpp:
(WebCore::CredentialStorage::getFromPersistentStorage):
* platform/network/curl/DNSCurl.cpp:
(WebCore::prefetchDNS):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::curl_lock_callback):
(WebCore::curl_unlock_callback):
(WebCore::headerCallback):
(WebCore::ResourceHandleManager::downloadTimerCallback):

Canonical link: https://commits.webkit.org/136166@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@152087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
elecro authored and webkit-commit-queue committed Jun 27, 2013
1 parent 39f5608 commit d5f9026c27f9dcec198b04a25c8978caed5c48b1
Showing 4 changed files with 29 additions and 9 deletions.
@@ -1,3 +1,24 @@
2013-06-27 Peter Gal <galpeter@inf.u-szeged.hu>

[curl] Fix unused variable/parameter warnings
https://bugs.webkit.org/show_bug.cgi?id=118050

Reviewed by Christophe Dumez.

Commented out unused parameters and removed an unused variable in the curl backend.

No tests required.

* platform/network/curl/CredentialStorageCurl.cpp:
(WebCore::CredentialStorage::getFromPersistentStorage):
* platform/network/curl/DNSCurl.cpp:
(WebCore::prefetchDNS):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::curl_lock_callback):
(WebCore::curl_unlock_callback):
(WebCore::headerCallback):
(WebCore::ResourceHandleManager::downloadTimerCallback):

2013-06-27 Csaba Osztrogonác <ossy@webkit.org>

Fix cast-align warnings in WebCore/platform/graphics/cairo
@@ -31,7 +31,7 @@

namespace WebCore {

Credential CredentialStorage::getFromPersistentStorage(const ProtectionSpace& protectionSpace)
Credential CredentialStorage::getFromPersistentStorage(const ProtectionSpace& /* protectionSpace */)
{
notImplemented();
return Credential();
@@ -30,7 +30,7 @@

namespace WebCore {

void prefetchDNS(const String& hostname)
void prefetchDNS(const String& /* hostname */)
{
notImplemented();
}
@@ -115,13 +115,13 @@ static Mutex* sharedResourceMutex(curl_lock_data data) {
// libcurl does not implement its own thread synchronization primitives.
// these two functions provide mutexes for cookies, and for the global DNS
// cache.
static void curl_lock_callback(CURL* handle, curl_lock_data data, curl_lock_access access, void* userPtr)
static void curl_lock_callback(CURL* /* handle */, curl_lock_data data, curl_lock_access /* access */, void* /* userPtr */)
{
if (Mutex* mutex = sharedResourceMutex(data))
mutex->lock();
}

static void curl_unlock_callback(CURL* handle, curl_lock_data data, void* userPtr)
static void curl_unlock_callback(CURL* /* handle */, curl_lock_data data, void* /* userPtr */)
{
if (Mutex* mutex = sharedResourceMutex(data))
mutex->unlock();
@@ -312,10 +312,9 @@ static size_t headerCallback(char* ptr, size_t size, size_t nmemb, void* data)
*/
if (header == String("\r\n") || header == String("\n")) {
CURL* h = d->m_handle;
CURLcode err;

long httpCode = 0;
err = curl_easy_getinfo(h, CURLINFO_RESPONSE_CODE, &httpCode);
curl_easy_getinfo(h, CURLINFO_RESPONSE_CODE, &httpCode);

if (isHttpInfo(httpCode)) {
// Just return when receiving http info, e.g. HTTP/1.1 100 Continue.
@@ -324,11 +323,11 @@ static size_t headerCallback(char* ptr, size_t size, size_t nmemb, void* data)
}

double contentLength = 0;
err = curl_easy_getinfo(h, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &contentLength);
curl_easy_getinfo(h, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &contentLength);
d->m_response.setExpectedContentLength(static_cast<long long int>(contentLength));

const char* hdr;
err = curl_easy_getinfo(h, CURLINFO_EFFECTIVE_URL, &hdr);
curl_easy_getinfo(h, CURLINFO_EFFECTIVE_URL, &hdr);
d->m_response.setURL(KURL(ParsedURLString, hdr));

d->m_response.setHTTPStatusCode(httpCode);
@@ -422,7 +421,7 @@ size_t readCallback(void* ptr, size_t size, size_t nmemb, void* data)
return sent;
}

void ResourceHandleManager::downloadTimerCallback(Timer<ResourceHandleManager>* timer)
void ResourceHandleManager::downloadTimerCallback(Timer<ResourceHandleManager>* /* timer */)
{
startScheduledJobs();

0 comments on commit d5f9026

Please sign in to comment.