Title: [155280] trunk/Source/WTF
- Revision
- 155280
- Author
- [email protected]
- Date
- 2013-09-07 20:46:22 -0700 (Sat, 07 Sep 2013)
Log Message
gtest fails to build due to integer type mismatch in WTF::insertIntoBoundedVector()
<http://webkit.org/b/120983>
Reviewed by Dan Bernstein.
Fixes the following build failure:
WebKitBuild/Debug/usr/local/include/wtf/StdLibExtras.h:266:23: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
for (unsigned i = size; i-- > index + 1;)
~ ^~~~
* wtf/StdLibExtras.h:
(WTF::insertIntoBoundedVector): Use size_t instead of unsigned
as for loop index variable.
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (155279 => 155280)
--- trunk/Source/WTF/ChangeLog 2013-09-08 03:42:17 UTC (rev 155279)
+++ trunk/Source/WTF/ChangeLog 2013-09-08 03:46:22 UTC (rev 155280)
@@ -1,3 +1,20 @@
+2013-09-07 David Kilzer <[email protected]>
+
+ gtest fails to build due to integer type mismatch in WTF::insertIntoBoundedVector()
+ <http://webkit.org/b/120983>
+
+ Reviewed by Dan Bernstein.
+
+ Fixes the following build failure:
+
+ WebKitBuild/Debug/usr/local/include/wtf/StdLibExtras.h:266:23: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
+ for (unsigned i = size; i-- > index + 1;)
+ ~ ^~~~
+
+ * wtf/StdLibExtras.h:
+ (WTF::insertIntoBoundedVector): Use size_t instead of unsigned
+ as for loop index variable.
+
2013-09-07 Anders Carlsson <[email protected]>
Remove NonCopyableSort.h from WTF
Modified: trunk/Source/WTF/wtf/StdLibExtras.h (155279 => 155280)
--- trunk/Source/WTF/wtf/StdLibExtras.h 2013-09-08 03:42:17 UTC (rev 155279)
+++ trunk/Source/WTF/wtf/StdLibExtras.h 2013-09-08 03:46:22 UTC (rev 155280)
@@ -263,7 +263,7 @@
template<typename VectorType, typename ElementType>
inline void insertIntoBoundedVector(VectorType& vector, size_t size, const ElementType& element, size_t index)
{
- for (unsigned i = size; i-- > index + 1;)
+ for (size_t i = size; i-- > index + 1;)
vector[i] = vector[i - 1];
vector[index] = element;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes