Bug 107126 - Fix vprintf_stderr_common() to compile with -Wshorten-64-to-32
Summary: Fix vprintf_stderr_common() to compile with -Wshorten-64-to-32
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
Depends on:
Blocks: 107093
  Show dependency treegraph
Reported: 2013-01-17 07:33 PST by David Kilzer (:ddkilzer)
Modified: 2013-01-17 08:38 PST (History)
3 users (show)

See Also:

Patch (1.88 KB, patch)
2013-01-17 07:33 PST, David Kilzer (:ddkilzer)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2013-01-17 07:33:42 PST
Created attachment 183183 [details]


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>