[Gtk][Gamepads] 'warning: comparison is always true due to limited range of data...
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2012 19:12:13 +0000 (19:12 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2012 19:12:13 +0000 (19:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=90477

Reviewed by Martin Robinson.

Vector::find() returns value of type size_t, springing errors when
assigning the value to a variable of type unsigned. Use size_t type
for that variable instead.

No new tests - no changed functionality.

* platform/gtk/GamepadsGtk.cpp:
(WebCore::GamepadsGtk::unregisterDevice):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/gtk/GamepadsGtk.cpp

index cf448c6..d5f0a2f 100644 (file)
@@ -1,3 +1,19 @@
+2012-07-03  Zan Dobersek  <zandobersek@gmail.com>
+
+        [Gtk][Gamepads] 'warning: comparison is always true due to limited range of data type [-Wtype-limits]' in GamepadsGtk.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=90477
+
+        Reviewed by Martin Robinson.
+
+        Vector::find() returns value of type size_t, springing errors when
+        assigning the value to a variable of type unsigned. Use size_t type
+        for that variable instead.
+
+        No new tests - no changed functionality.
+
+        * platform/gtk/GamepadsGtk.cpp:
+        (WebCore::GamepadsGtk::unregisterDevice):
+
 2012-07-03  Dominik Röttsches  <dominik.rottsches@intel.com>
 
         Fix LayoutUnit usage in RenderImage::imageDimensionsChanged
index b39395b..5329116 100644 (file)
@@ -154,7 +154,7 @@ void GamepadsGtk::unregisterDevice(String deviceFile)
     ASSERT(m_deviceMap.contains(deviceFile));
 
     GamepadDeviceGtk* gamepadDevice = m_deviceMap.take(deviceFile);
-    unsigned index = m_slots.find(gamepadDevice);
+    size_t index = m_slots.find(gamepadDevice);
     ASSERT(index != notFound);
 
     m_slots[index].clear();