Title: [127118] trunk/Source/WebCore
Revision
127118
Author
[email protected]
Date
2012-08-30 02:38:50 -0700 (Thu, 30 Aug 2012)

Log Message

Fix compile warning when enable tiled backing store
https://bugs.webkit.org/show_bug.cgi?id=95422

Patch by Kangil Han <[email protected]> on 2012-08-30
Reviewed by Kentaro Hara.

Fixed compile warning messages when enabled tiled backing store.
In case of TiledBackingStore, it was first thought about static_cast<unsigned>.
However, if minus value is assigned to the comparison, it would be critical.
So, it was modified as using int value in tiled coordinate calculation.

* page/Frame.cpp:
(WebCore::Frame::tiledBackingStorePaintEnd): comparison between signed and unsigned integer expressions [-Wsign-compare]
* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::invalidate): comparison between signed and unsigned integer expressions [-Wsign-compare]
(WebCore::TiledBackingStore::paint): comparison between signed and unsigned integer expressions [-Wsign-compare]
(WebCore::TiledBackingStore::coverageRatio): comparison between signed and unsigned integer expressions [-Wsign-compare]
(WebCore::TiledBackingStore::createTiles): comparison between signed and unsigned integer expressions [-Wsign-compare]
* platform/graphics/cairo/GLContext.cpp:
(WebCore::GLContext::createOffscreenContext): no return statement in function returning non-void [-Wreturn-type]

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (127117 => 127118)


--- trunk/Source/WebCore/ChangeLog	2012-08-30 09:33:08 UTC (rev 127117)
+++ trunk/Source/WebCore/ChangeLog	2012-08-30 09:38:50 UTC (rev 127118)
@@ -1,3 +1,25 @@
+2012-08-30  Kangil Han  <[email protected]>
+
+        Fix compile warning when enable tiled backing store
+        https://bugs.webkit.org/show_bug.cgi?id=95422
+
+        Reviewed by Kentaro Hara.
+
+        Fixed compile warning messages when enabled tiled backing store.
+        In case of TiledBackingStore, it was first thought about static_cast<unsigned>.
+        However, if minus value is assigned to the comparison, it would be critical.
+        So, it was modified as using int value in tiled coordinate calculation.
+
+        * page/Frame.cpp:
+        (WebCore::Frame::tiledBackingStorePaintEnd): comparison between signed and unsigned integer expressions [-Wsign-compare]
+        * platform/graphics/TiledBackingStore.cpp:
+        (WebCore::TiledBackingStore::invalidate): comparison between signed and unsigned integer expressions [-Wsign-compare]
+        (WebCore::TiledBackingStore::paint): comparison between signed and unsigned integer expressions [-Wsign-compare]
+        (WebCore::TiledBackingStore::coverageRatio): comparison between signed and unsigned integer expressions [-Wsign-compare]
+        (WebCore::TiledBackingStore::createTiles): comparison between signed and unsigned integer expressions [-Wsign-compare]
+        * platform/graphics/cairo/GLContext.cpp:
+        (WebCore::GLContext::createOffscreenContext): no return statement in function returning non-void [-Wreturn-type]
+
 2012-08-30  Anton Muhin  <[email protected]>
 
         Heap-use-after-free in WebCore::ElementV8Internal::onclickAttrGetter

Modified: trunk/Source/WebCore/page/Frame.cpp (127117 => 127118)


--- trunk/Source/WebCore/page/Frame.cpp	2012-08-30 09:33:08 UTC (rev 127117)
+++ trunk/Source/WebCore/page/Frame.cpp	2012-08-30 09:38:50 UTC (rev 127118)
@@ -850,7 +850,7 @@
         return;
     unsigned size = paintedArea.size();
     // Request repaint from the system
-    for (int n = 0; n < size; ++n)
+    for (unsigned n = 0; n < size; ++n)
         m_page->chrome()->invalidateContentsAndRootView(m_view->contentsToRootView(paintedArea[n]), false);
 }
 

Modified: trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp (127117 => 127118)


--- trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp	2012-08-30 09:33:08 UTC (rev 127117)
+++ trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp	2012-08-30 09:38:50 UTC (rev 127118)
@@ -91,8 +91,8 @@
     Tile::Coordinate topLeft = tileCoordinateForPoint(coveredDirtyRect.location());
     Tile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(coveredDirtyRect));
 
-    for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
-        for (unsigned xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
+    for (int yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
+        for (int xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
             RefPtr<Tile> currentTile = tileAt(Tile::Coordinate(xCoordinate, yCoordinate));
             if (!currentTile)
                 continue;
@@ -152,8 +152,8 @@
     Tile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location());
     Tile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(dirtyRect));
 
-    for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
-        for (unsigned xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
+    for (int yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
+        for (int xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
             Tile::Coordinate currentCoordinate(xCoordinate, yCoordinate);
             RefPtr<Tile> currentTile = tileAt(currentCoordinate);
             if (currentTile && currentTile->isReadyToPaint())
@@ -221,8 +221,8 @@
     Tile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location());
     Tile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(dirtyRect));
 
-    for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
-        for (unsigned xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
+    for (int yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
+        for (int xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
             Tile::Coordinate currentCoordinate(xCoordinate, yCoordinate);
             RefPtr<Tile> currentTile = tileAt(currentCoordinate);
             if (currentTile && currentTile->isReadyToPaint()) {
@@ -278,8 +278,8 @@
     // inside the visible rect.
     Tile::Coordinate topLeft = tileCoordinateForPoint(coverRect.location());
     Tile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(coverRect));
-    for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
-        for (unsigned xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
+    for (int yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
+        for (int xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
             Tile::Coordinate currentCoordinate(xCoordinate, yCoordinate);
             if (tileAt(currentCoordinate))
                 continue;

Modified: trunk/Source/WebCore/platform/graphics/cairo/GLContext.cpp (127117 => 127118)


--- trunk/Source/WebCore/platform/graphics/cairo/GLContext.cpp	2012-08-30 09:33:08 UTC (rev 127117)
+++ trunk/Source/WebCore/platform/graphics/cairo/GLContext.cpp	2012-08-30 09:38:50 UTC (rev 127118)
@@ -53,6 +53,7 @@
 #if USE(GLX)
     return GLContextGLX::createContext(0, sharing);
 #endif
+    return nullptr;
 }
 
 // FIXME: This should be a thread local eventually if we
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to