Title: [133348] trunk/Source/WebKit/blackberry
Revision
133348
Author
commit-qu...@webkit.org
Date
2012-11-02 14:32:01 -0700 (Fri, 02 Nov 2012)

Log Message

[BlackBerry] Fix compile-time warning of a possible empty-body if statement
https://bugs.webkit.org/show_bug.cgi?id=101095

Patch by Nima Ghanavatian <nghanavat...@rim.com> on 2012-11-02
Reviewed by Yong Li.
Internally reviewed by Jeff Rogers.

BBLOG might be compiled out leaving an if statement with an empty
body. This is giving us a warning at the moment. Simply putting braces
around it will fail as well because then we'd have braces around a
single-line if. So, in following with the style observed in other parts
of BackingStore.cpp, break up the log message and add braces.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
(BlackBerry::WebKit::BackingStorePrivate::fillWindow):
(BlackBerry::WebKit::BackingStorePrivate::clearWindow):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/BackingStore.cpp (133347 => 133348)


--- trunk/Source/WebKit/blackberry/Api/BackingStore.cpp	2012-11-02 21:28:37 UTC (rev 133347)
+++ trunk/Source/WebKit/blackberry/Api/BackingStore.cpp	2012-11-02 21:32:01 UTC (rev 133348)
@@ -2330,8 +2330,10 @@
     BlackBerry::Platform::Graphics::Buffer* dstBuffer = buffer();
     ASSERT(dstBuffer);
     ASSERT(srcBuffer);
-    if (!dstBuffer)
-        BBLOG(BlackBerry::Platform::LogLevelWarn, "Empty window buffer, couldn't blitToWindow");
+    if (!dstBuffer) {
+        BBLOG(BlackBerry::Platform::LogLevelWarn,
+            "Empty window buffer, couldn't blitToWindow");
+    }
 
     BlackBerry::Platform::Graphics::BlendMode blendMode = blend
         ? BlackBerry::Platform::Graphics::SourceOver
@@ -2359,8 +2361,10 @@
 
     BlackBerry::Platform::Graphics::Buffer* dstBuffer = buffer();
     ASSERT(dstBuffer);
-    if (!dstBuffer)
-        BBLOG(BlackBerry::Platform::LogLevelWarn, "Empty window buffer, couldn't fillWindow");
+    if (!dstBuffer) {
+        BBLOG(BlackBerry::Platform::LogLevelWarn,
+            "Empty window buffer, couldn't fillWindow");
+    }
 
     BlackBerry::Platform::Graphics::fillBuffer(dstBuffer, pattern, dstRect, contentsOrigin, contentsScale);
 }
@@ -2444,8 +2448,10 @@
 
     BlackBerry::Platform::Graphics::Buffer* dstBuffer = buffer();
     ASSERT(dstBuffer);
-    if (!dstBuffer)
-        BBLOG(BlackBerry::Platform::LogLevelWarn, "Empty window buffer, couldn't clearWindow");
+    if (!dstBuffer) {
+        BBLOG(BlackBerry::Platform::LogLevelWarn,
+            "Empty window buffer, couldn't clearWindow");
+    }
 
     windowFrontBufferState()->clearBlittedRegion(rect);
     windowBackBufferState()->addBlittedRegion(rect);

Modified: trunk/Source/WebKit/blackberry/ChangeLog (133347 => 133348)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-11-02 21:28:37 UTC (rev 133347)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-11-02 21:32:01 UTC (rev 133348)
@@ -1,5 +1,24 @@
 2012-11-02  Nima Ghanavatian  <nghanavat...@rim.com>
 
+        [BlackBerry] Fix compile-time warning of a possible empty-body if statement
+        https://bugs.webkit.org/show_bug.cgi?id=101095
+
+        Reviewed by Yong Li.
+        Internally reviewed by Jeff Rogers.
+
+        BBLOG might be compiled out leaving an if statement with an empty
+        body. This is giving us a warning at the moment. Simply putting braces
+        around it will fail as well because then we'd have braces around a
+        single-line if. So, in following with the style observed in other parts
+        of BackingStore.cpp, break up the log message and add braces.
+
+        * Api/BackingStore.cpp:
+        (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
+        (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
+        (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
+
+2012-11-02  Nima Ghanavatian  <nghanavat...@rim.com>
+
         [BlackBerry] Optimize backspace key handling
         https://bugs.webkit.org/show_bug.cgi?id=101083
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to