Title: [129319] trunk/Source
Revision
129319
Author
[email protected]
Date
2012-09-23 18:02:19 -0700 (Sun, 23 Sep 2012)

Log Message

Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized.
https://bugs.webkit.org/show_bug.cgi?id=97306

Patch by Byungwoo Lee <[email protected]> on 2012-09-23
Reviewed by Benjamin Poulain.

Source/_javascript_Core:

Fix build warning about -Wunused-parameter on MachineStackMarker.cpp,
LLIntSlowPaths.cpp, DatePrototype.cpp, Options.cpp by using
UNUSED_PARAM() macro or remove parameter name.

* heap/MachineStackMarker.cpp:
(JSC::pthreadSignalHandlerSuspendResume):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::entryOSR):
* runtime/DatePrototype.cpp:
(JSC::formatLocaleDate):
* runtime/Options.cpp:
(JSC::computeNumberOfGCMarkers):

Source/WebCore:

Fix build warning about -Wunused-parameter on ImageBufferCairo.cpp,
ImageDecoder.h by using ASSERT_UNUSED() macro.

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::encodeImage):
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::rgbColorProfile):
(WebCore::ImageDecoder::inputDeviceColorProfile):

Source/WebKit/efl:

Fix build warning about -Wunused-parameter on FrameLoaderClientEfl.cpp
by using ASSERT_UNUSED() macro.
Fix build warning aboug -Wparentheses on ewk_frame.cpp by adding
additional brace for the assign statement.

* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::dispatchDidChangeIcons):
* ewk/ewk_frame.cpp:
(ewk_frame_resources_location_get):

Source/WebKit2:

Fix build warning about -Wunused-parameter on Connection.cpp,
WKEinaSharedString.cpp, ewk_view_loader_client.cpp, WebPage.cpp by
using ASSERT_UNUSED() macro or removing parameter name.
Fix build warning about -Wuninitialized on WebEventFactory.cpp by
continueing the loop at the default switch case not to use the
uninitialized variable.

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::waitForSyncReply):
* Shared/efl/WebEventFactory.cpp:
(WebKit::WebEventFactory::createWebTouchEvent):
* UIProcess/API/cpp/efl/WKEinaSharedString.cpp:
(WKEinaSharedString::WKEinaSharedString):
* UIProcess/API/efl/ewk_view_loader_client.cpp:
(didSameDocumentNavigationForFrame):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::SandboxExtensionTracker::beginLoad):

Source/WTF:

Fix build warning about -Wunused-parameter on FastMalloc.cpp,
OSAllocatorPosix.cpp by using UNUSED_PARAM() macro.
Fix header including order of FastMalloc.cpp.

* wtf/FastMalloc.cpp:
(WTF::fastMallocSize):
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveAndCommit):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (129318 => 129319)


--- trunk/Source/_javascript_Core/ChangeLog	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-09-24 01:02:19 UTC (rev 129319)
@@ -1,3 +1,23 @@
+2012-09-23  Byungwoo Lee  <[email protected]>
+
+        Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized.
+        https://bugs.webkit.org/show_bug.cgi?id=97306
+
+        Reviewed by Benjamin Poulain.
+
+        Fix build warning about -Wunused-parameter on MachineStackMarker.cpp,
+        LLIntSlowPaths.cpp, DatePrototype.cpp, Options.cpp by using
+        UNUSED_PARAM() macro or remove parameter name.
+
+        * heap/MachineStackMarker.cpp:
+        (JSC::pthreadSignalHandlerSuspendResume):
+        * llint/LLIntSlowPaths.cpp:
+        (JSC::LLInt::entryOSR):
+        * runtime/DatePrototype.cpp:
+        (JSC::formatLocaleDate):
+        * runtime/Options.cpp:
+        (JSC::computeNumberOfGCMarkers):
+
 2012-09-23  Gavin Barraclough  <[email protected]>
 
         Sorting a non-array creates propreties (spec-violation)

Modified: trunk/Source/_javascript_Core/heap/MachineStackMarker.cpp (129318 => 129319)


--- trunk/Source/_javascript_Core/heap/MachineStackMarker.cpp	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/_javascript_Core/heap/MachineStackMarker.cpp	2012-09-24 01:02:19 UTC (rev 129319)
@@ -96,7 +96,7 @@
 static const int SigThreadSuspendResume = SIGUSR2;
 
 #if defined(SA_RESTART)
-static void pthreadSignalHandlerSuspendResume(int signo)
+static void pthreadSignalHandlerSuspendResume(int)
 {
     sigset_t signalSet;
     sigemptyset(&signalSet);

Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (129318 => 129319)


--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp	2012-09-24 01:02:19 UTC (rev 129319)
@@ -301,11 +301,13 @@
 }
 
 enum EntryKind { Prologue, ArityCheck };
-static SlowPathReturnType entryOSR(ExecState* exec, Instruction* pc, CodeBlock* codeBlock, const char *name, EntryKind kind)
+static SlowPathReturnType entryOSR(ExecState* exec, Instruction*, CodeBlock* codeBlock, const char *name, EntryKind kind)
 {
 #if ENABLE(JIT_VERBOSE_OSR)
     dataLog("%p: Entered %s with executeCounter = %s\n", codeBlock, name,
             codeBlock->llintExecuteCounter().status());
+#else
+    UNUSED_PARAM(name);
 #endif
     
     if (!shouldJIT(exec)) {

Modified: trunk/Source/_javascript_Core/runtime/DatePrototype.cpp (129318 => 129319)


--- trunk/Source/_javascript_Core/runtime/DatePrototype.cpp	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/_javascript_Core/runtime/DatePrototype.cpp	2012-09-24 01:02:19 UTC (rev 129319)
@@ -195,7 +195,7 @@
 
 #elif USE(ICU_UNICODE) && !UCONFIG_NO_FORMATTING
 
-static JSCell* formatLocaleDate(ExecState* exec, DateInstance* dateObject, double timeInMilliseconds, LocaleDateTimeFormat format)
+static JSCell* formatLocaleDate(ExecState* exec, DateInstance*, double timeInMilliseconds, LocaleDateTimeFormat format)
 {
     UDateFormatStyle timeStyle = (format != LocaleDate ? UDAT_LONG : UDAT_NONE);
     UDateFormatStyle dateStyle = (format != LocaleTime ? UDAT_LONG : UDAT_NONE);

Modified: trunk/Source/_javascript_Core/runtime/Options.cpp (129318 => 129319)


--- trunk/Source/_javascript_Core/runtime/Options.cpp	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/_javascript_Core/runtime/Options.cpp	2012-09-24 01:02:19 UTC (rev 129319)
@@ -35,6 +35,7 @@
 #include <wtf/PageBlock.h>
 #include <wtf/StdLibExtras.h>
 #include <wtf/StringExtras.h>
+#include <wtf/UnusedParam.h>
 
 #if OS(DARWIN) && ENABLE(PARALLEL_GC)
 #include <sys/sysctl.h>
@@ -101,6 +102,8 @@
     ASSERT(cpusToUse >= 1);
     if (cpusToUse < 1)
         cpusToUse = 1;
+#else
+    UNUSED_PARAM(maxNumberOfGCMarkers);
 #endif
 
     return cpusToUse;

Modified: trunk/Source/WTF/ChangeLog (129318 => 129319)


--- trunk/Source/WTF/ChangeLog	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/WTF/ChangeLog	2012-09-24 01:02:19 UTC (rev 129319)
@@ -1,3 +1,19 @@
+2012-09-23  Byungwoo Lee  <[email protected]>
+
+        Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized.
+        https://bugs.webkit.org/show_bug.cgi?id=97306
+
+        Reviewed by Benjamin Poulain.
+
+        Fix build warning about -Wunused-parameter on FastMalloc.cpp,
+        OSAllocatorPosix.cpp by using UNUSED_PARAM() macro.
+        Fix header including order of FastMalloc.cpp.
+
+        * wtf/FastMalloc.cpp:
+        (WTF::fastMallocSize):
+        * wtf/OSAllocatorPosix.cpp:
+        (WTF::OSAllocator::reserveAndCommit):
+
 2012-09-22  Sam Weinig  <[email protected]>
 
         Add explicit conversion operator to RetainPtr for easier use in C++11 environments

Modified: trunk/Source/WTF/wtf/FastMalloc.cpp (129318 => 129319)


--- trunk/Source/WTF/wtf/FastMalloc.cpp	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/WTF/wtf/FastMalloc.cpp	2012-09-24 01:02:19 UTC (rev 129319)
@@ -84,8 +84,9 @@
 #else
 #include <pthread.h>
 #endif
+#include <string.h>
 #include <wtf/StdLibExtras.h>
-#include <string.h>
+#include <wtf/UnusedParam.h>
 
 #ifndef NO_TCMALLOC_SAMPLES
 #ifdef WTF_CHANGES
@@ -391,6 +392,7 @@
 #elif OS(WINDOWS)
     return _msize(const_cast<void*>(p));
 #else
+    UNUSED_PARAM(p);
     return 1;
 #endif
 }

Modified: trunk/Source/WTF/wtf/OSAllocatorPosix.cpp (129318 => 129319)


--- trunk/Source/WTF/wtf/OSAllocatorPosix.cpp	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/WTF/wtf/OSAllocatorPosix.cpp	2012-09-24 01:02:19 UTC (rev 129319)
@@ -86,6 +86,7 @@
 #if OS(DARWIN)
     int fd = usage;
 #else
+    UNUSED_PARAM(usage);
     int fd = -1;
 #endif
 

Modified: trunk/Source/WebCore/ChangeLog (129318 => 129319)


--- trunk/Source/WebCore/ChangeLog	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/WebCore/ChangeLog	2012-09-24 01:02:19 UTC (rev 129319)
@@ -1,3 +1,19 @@
+2012-09-23  Byungwoo Lee  <[email protected]>
+
+        Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized.
+        https://bugs.webkit.org/show_bug.cgi?id=97306
+
+        Reviewed by Benjamin Poulain.
+
+        Fix build warning about -Wunused-parameter on ImageBufferCairo.cpp,
+        ImageDecoder.h by using ASSERT_UNUSED() macro.
+
+        * platform/graphics/cairo/ImageBufferCairo.cpp:
+        (WebCore::encodeImage):
+        * platform/image-decoders/ImageDecoder.h:
+        (WebCore::ImageDecoder::rgbColorProfile):
+        (WebCore::ImageDecoder::inputDeviceColorProfile):
+
 2012-09-23  Andreas Kling  <[email protected]>
 
         Enable ElementAttributeData sharing for non-HTML elements.

Modified: trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp (129318 => 129319)


--- trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp	2012-09-24 01:02:19 UTC (rev 129319)
@@ -268,7 +268,7 @@
 
 static bool encodeImage(cairo_surface_t* image, const String& mimeType, Vector<char>* output)
 {
-    ASSERT(mimeType == "image/png"); // Only PNG output is supported for now.
+    ASSERT_UNUSED(mimeType, mimeType == "image/png"); // Only PNG output is supported for now.
 
     return cairo_surface_write_to_png_stream(image, writeFunction, output) == CAIRO_STATUS_SUCCESS;
 }

Modified: trunk/Source/WebCore/platform/image-decoders/ImageDecoder.h (129318 => 129319)


--- trunk/Source/WebCore/platform/image-decoders/ImageDecoder.h	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/WebCore/platform/image-decoders/ImageDecoder.h	2012-09-24 01:02:19 UTC (rev 129319)
@@ -289,14 +289,14 @@
 
         static bool rgbColorProfile(const char* profileData, unsigned profileLength)
         {
-            ASSERT(profileLength >= iccColorProfileHeaderLength);
+            ASSERT_UNUSED(profileLength, profileLength >= iccColorProfileHeaderLength);
 
             return !memcmp(&profileData[16], "RGB ", 4);
         }
 
         static bool inputDeviceColorProfile(const char* profileData, unsigned profileLength)
         {
-            ASSERT(profileLength >= iccColorProfileHeaderLength);
+            ASSERT_UNUSED(profileLength, profileLength >= iccColorProfileHeaderLength);
 
             return !memcmp(&profileData[12], "mntr", 4) || !memcmp(&profileData[12], "scnr", 4);
         }

Modified: trunk/Source/WebKit/efl/ChangeLog (129318 => 129319)


--- trunk/Source/WebKit/efl/ChangeLog	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/WebKit/efl/ChangeLog	2012-09-24 01:02:19 UTC (rev 129319)
@@ -1,3 +1,20 @@
+2012-09-23  Byungwoo Lee  <[email protected]>
+
+        Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized.
+        https://bugs.webkit.org/show_bug.cgi?id=97306
+
+        Reviewed by Benjamin Poulain.
+
+        Fix build warning about -Wunused-parameter on FrameLoaderClientEfl.cpp
+        by using ASSERT_UNUSED() macro.
+        Fix build warning aboug -Wparentheses on ewk_frame.cpp by adding
+        additional brace for the assign statement.
+
+        * WebCoreSupport/FrameLoaderClientEfl.cpp:
+        (WebCore::FrameLoaderClientEfl::dispatchDidChangeIcons):
+        * ewk/ewk_frame.cpp:
+        (ewk_frame_resources_location_get):
+
 2012-09-21  Christophe Dumez  <[email protected]>
 
         [EFL] EventSender should mimic CTRL+o emacs shortcut

Modified: trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp (129318 => 129319)


--- trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2012-09-24 01:02:19 UTC (rev 129319)
@@ -659,7 +659,7 @@
 void FrameLoaderClientEfl::dispatchDidChangeIcons(WebCore::IconType iconType)
 {
     // Other touch types are apple-specific
-    ASSERT(iconType == WebCore::Favicon);
+    ASSERT_UNUSED(iconType, iconType == WebCore::Favicon);
     ewk_frame_icon_changed(m_frame);
 }
 

Modified: trunk/Source/WebKit/efl/ewk/ewk_frame.cpp (129318 => 129319)


--- trunk/Source/WebKit/efl/ewk/ewk_frame.cpp	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/WebKit/efl/ewk/ewk_frame.cpp	2012-09-24 01:02:19 UTC (rev 129319)
@@ -1694,7 +1694,7 @@
         void* data = ""
         Eina_Bool found = false;
         EINA_LIST_FOREACH(listOfImagesLocation, listIterator, data)
-            if (found = !strcmp(static_cast<char*>(data), imageLocation.utf8().data()))
+            if ((found = !strcmp(static_cast<char*>(data), imageLocation.utf8().data())))
                 break;
         if (found)
             continue;

Modified: trunk/Source/WebKit2/ChangeLog (129318 => 129319)


--- trunk/Source/WebKit2/ChangeLog	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/WebKit2/ChangeLog	2012-09-24 01:02:19 UTC (rev 129319)
@@ -1,3 +1,28 @@
+2012-09-23  Byungwoo Lee  <[email protected]>
+
+        Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized.
+        https://bugs.webkit.org/show_bug.cgi?id=97306
+
+        Reviewed by Benjamin Poulain.
+
+        Fix build warning about -Wunused-parameter on Connection.cpp,
+        WKEinaSharedString.cpp, ewk_view_loader_client.cpp, WebPage.cpp by
+        using ASSERT_UNUSED() macro or removing parameter name.
+        Fix build warning about -Wuninitialized on WebEventFactory.cpp by
+        continueing the loop at the default switch case not to use the
+        uninitialized variable.
+
+        * Platform/CoreIPC/Connection.cpp:
+        (CoreIPC::Connection::waitForSyncReply):
+        * Shared/efl/WebEventFactory.cpp:
+        (WebKit::WebEventFactory::createWebTouchEvent):
+        * UIProcess/API/cpp/efl/WKEinaSharedString.cpp:
+        (WKEinaSharedString::WKEinaSharedString):
+        * UIProcess/API/efl/ewk_view_loader_client.cpp:
+        (didSameDocumentNavigationForFrame):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::SandboxExtensionTracker::beginLoad):
+
 2012-09-22  Sam Weinig  <[email protected]>
 
         Install WebProcess XPC services into the right places

Modified: trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp (129318 => 129319)


--- trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp	2012-09-24 01:02:19 UTC (rev 129319)
@@ -448,7 +448,7 @@
             ASSERT(!m_pendingSyncReplies.isEmpty());
             
             PendingSyncReply& pendingSyncReply = m_pendingSyncReplies.last();
-            ASSERT(pendingSyncReply.syncRequestID == syncRequestID);
+            ASSERT_UNUSED(syncRequestID, pendingSyncReply.syncRequestID == syncRequestID);
             
             // We found the sync reply, or the connection was closed.
             if (pendingSyncReply.didReceiveReply || !m_shouldWaitForSyncReplies)

Modified: trunk/Source/WebKit2/Shared/efl/WebEventFactory.cpp (129318 => 129319)


--- trunk/Source/WebKit2/Shared/efl/WebEventFactory.cpp	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/WebKit2/Shared/efl/WebEventFactory.cpp	2012-09-24 01:02:19 UTC (rev 129319)
@@ -234,7 +234,7 @@
             break;
         default:
             ASSERT_NOT_REACHED();
-            break;
+            continue;
         }
 
         touchPoints.append(WebPlatformTouchPoint(point->id, state, IntPoint(point->x, point->y), IntPoint(point->x - position->x, point->y - position->y)));

Modified: trunk/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp (129318 => 129319)


--- trunk/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp	2012-09-24 01:02:19 UTC (rev 129319)
@@ -60,7 +60,7 @@
 WKEinaSharedString::WKEinaSharedString(WKAdoptTag adoptTag, WKStringRef stringRef)
     : m_string(fromRefType(stringRef, /*adopt*/ true))
 {
-    ASSERT(adoptTag == AdoptWK); // Guard for future enum changes.
+    ASSERT_UNUSED(adoptTag, adoptTag == AdoptWK); // Guard for future enum changes.
 }
 
 WKEinaSharedString::WKEinaSharedString(WKStringRef stringRef)
@@ -71,7 +71,7 @@
 WKEinaSharedString::WKEinaSharedString(WKAdoptTag adoptTag, WKURLRef urlRef)
     : m_string(fromRefType(urlRef, /*adopt*/ true))
 {
-    ASSERT(adoptTag == AdoptWK); // Guard for future enum changes.
+    ASSERT_UNUSED(adoptTag, adoptTag == AdoptWK); // Guard for future enum changes.
 }
 
 WKEinaSharedString::WKEinaSharedString(WKURLRef urlRef)

Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp (129318 => 129319)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp	2012-09-24 01:02:19 UTC (rev 129319)
@@ -133,7 +133,7 @@
     ewk_back_forward_list_changed(ewk_view_back_forward_list_get(ewkView), addedItem, removedItems);
 }
 
-static void didSameDocumentNavigationForFrame(WKPageRef page, WKFrameRef frame, WKSameDocumentNavigationType, WKTypeRef, const void* clientInfo)
+static void didSameDocumentNavigationForFrame(WKPageRef, WKFrameRef frame, WKSameDocumentNavigationType, WKTypeRef, const void* clientInfo)
 {
     if (!WKFrameIsMainFrame(frame))
         return;

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (129318 => 129319)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-09-24 00:57:54 UTC (rev 129318)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-09-24 01:02:19 UTC (rev 129319)
@@ -2795,7 +2795,7 @@
 
 void WebPage::SandboxExtensionTracker::beginLoad(WebFrame* frame, const SandboxExtension::Handle& handle)
 {
-    ASSERT(frame->isMainFrame());
+    ASSERT_UNUSED(frame, frame->isMainFrame());
 
     setPendingProvisionalSandboxExtension(SandboxExtension::create(handle));
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to