Title: [181475] trunk/Source/WebCore
Revision
181475
Author
[email protected]
Date
2015-03-13 00:52:39 -0700 (Fri, 13 Mar 2015)

Log Message

Fix Debug build error 'comparison is always true due to limited range of data type [-Werror=type-limits]'
https://bugs.webkit.org/show_bug.cgi?id=142652

Patch by Joonghun Park <[email protected]> on 2015-03-13
Reviewed by Csaba Osztrogonác.

No new tests, no behavior changes.

Now CSSPropertyID type is uint16_t, so propertyID >= 0 check is needed no more.

* css/CSSPrimitiveValue.cpp:
(WebCore::propertyName):
* css/makeprop.pl:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (181474 => 181475)


--- trunk/Source/WebCore/ChangeLog	2015-03-13 07:18:22 UTC (rev 181474)
+++ trunk/Source/WebCore/ChangeLog	2015-03-13 07:52:39 UTC (rev 181475)
@@ -1,3 +1,18 @@
+2015-03-13  Joonghun Park  <[email protected]>
+
+        Fix Debug build error 'comparison is always true due to limited range of data type [-Werror=type-limits]'
+        https://bugs.webkit.org/show_bug.cgi?id=142652
+
+        Reviewed by Csaba Osztrogonác.
+
+        No new tests, no behavior changes.
+
+        Now CSSPropertyID type is uint16_t, so propertyID >= 0 check is needed no more.
+
+        * css/CSSPrimitiveValue.cpp:
+        (WebCore::propertyName):
+        * css/makeprop.pl:
+
 2015-03-12  Zan Dobersek  <[email protected]>
 
         Remove DrawingBuffer

Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (181474 => 181475)


--- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp	2015-03-13 07:18:22 UTC (rev 181474)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp	2015-03-13 07:52:39 UTC (rev 181475)
@@ -217,7 +217,6 @@
 
 static const AtomicString& propertyName(CSSPropertyID propertyID)
 {
-    ASSERT_ARG(propertyID, propertyID >= 0);
     ASSERT_ARG(propertyID, (propertyID >= firstCSSProperty && propertyID < firstCSSProperty + numCSSProperties));
 
     return getPropertyNameAtomicString(propertyID);

Modified: trunk/Source/WebCore/css/makeprop.pl (181474 => 181475)


--- trunk/Source/WebCore/css/makeprop.pl	2015-03-13 07:18:22 UTC (rev 181474)
+++ trunk/Source/WebCore/css/makeprop.pl	2015-03-13 07:52:39 UTC (rev 181475)
@@ -249,7 +249,7 @@
 
 bool CSSProperty::isInheritedProperty(CSSPropertyID id)
 {
-    ASSERT(id >= 0 && id <= lastCSSProperty);
+    ASSERT(id <= lastCSSProperty);
     ASSERT(id != CSSPropertyInvalid);
     return isInheritedPropertyTable[id];
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to