Bug 107126

Summary: Fix vprintf_stderr_common() to compile with -Wshorten-64-to-32
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Web Template FrameworkAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, ojan.autocc, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 107093    
Attachments:
Description Flags
Patch darin: review+

Description David Kilzer (:ddkilzer) 2013-01-17 07:33:42 PST
Created attachment 183183 [details]
Patch

<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(-)
Comment 1 David Kilzer (:ddkilzer) 2013-01-17 08:38:57 PST
Committed r139982: <http://trac.webkit.org/changeset/139982>