Fix vprintf_stderr_common() to compile with -Wshorten-64-to-32
[WebKit-https.git] / Source / WTF / ChangeLog
index 2e795e1..c65cd7d 100644 (file)
@@ -1,3 +1,21 @@
+2013-01-17  David Kilzer  <ddkilzer@apple.com>
+
+        Fix vprintf_stderr_common() to compile with -Wshorten-64-to-32
+        <http://webkit.org/b/107126>
+
+        Reviewed by Darin Adler.
+
+        Fixes the following build error:
+
+            Assertions.cpp:92:22: error: implicit conversion loses integer precision: 'CFIndex' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
+                    int length = CFStringGetMaximumSizeForEncoding(CFStringGetLength(str), kCFStringEncodingUTF8);
+                        ~~~~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+            1 error generated.
+
+        * wtf/Assertions.cpp:
+        (vprintf_stderr_common): Use CFIndex type instead of int for the
+        return value of CFStringGetMaximumSizeForEncoding().
+
 2013-01-17  Zan Dobersek  <zdobersek@igalia.com>
 
         [Autotools] Unify WTF sources list regardless of the target OS, Unicode backend