[webkit-reviews] review requested: [Bug 107126] Fix vprintf_stderr_common() to compile with -Wshorten-64-to-32 : [Attachment 183183] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 17 07:31:55 PST 2013


David Kilzer (:ddkilzer) <ddkilzer at webkit.org> has asked  for review:
Bug 107126: Fix vprintf_stderr_common() to compile with -Wshorten-64-to-32
https://bugs.webkit.org/show_bug.cgi?id=107126

Attachment 183183: Patch
https://bugs.webkit.org/attachment.cgi?id=183183&action=review

------- Additional Comments from David Kilzer (:ddkilzer) <ddkilzer at webkit.org>
<http://webkit.org/b/000000>

Reviewed by NOBODY (OOPS!).

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().
---
 2 files changed, 19 insertions(+), 1 deletion(-)


More information about the webkit-reviews mailing list