Bug 70158 - Fix clang compiler warnings
Summary: Fix clang compiler warnings
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
Depends on:
Reported: 2011-10-14 17:03 PDT by David Kilzer (:ddkilzer)
Modified: 2011-10-14 21:39 PDT (History)
3 users (show)

See Also:

Patch (5.33 KB, patch)
2011-10-14 17:03 PDT, 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) 2011-10-14 17:03:36 PDT
Created attachment 111110 [details]

Reviewed by NOBODY (OOPS!).


* dom/ViewportArguments.cpp:
(WebCore::computeViewportAttributes): Use std::max<float>()
instead of std::max().


The following two methods in WebDelegateImplementationCaching.h
are ambiguous in WebChromeClient::runJavaScriptPrompt() because
the compiler can't decide how to convert the WebCore::String
defaultText argument:

id CallUIDelegate(WebView *, SEL, id, id);
id CallUIDelegate(WebView *, SEL, id, BOOL);

The fix is to perform the conversion explicitly.

* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::runJavaScriptPrompt): Extract a defaultString
variable to convert the WebCore::String to an NSString*, then
use defaultString in place of defaultText.
 4 files changed, 39 insertions(+), 7 deletions(-)
Comment 1 WebKit Review Bot 2011-10-14 17:07:14 PDT
Attachment 111110 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebKit/mac/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Source/WebCore/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 2 in 4 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 2 Joseph Pecoraro 2011-10-14 18:24:04 PDT
Comment on attachment 111110 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=111110&action=review

> Source/WebKit/mac/ChangeLog:19
> +        variable to convert the WebCore::String to an NSString*, then

Nit: "WebCore::String" => "WTF::String"
Comment 3 David Kilzer (:ddkilzer) 2011-10-14 21:39:05 PDT
Committed r97538: <http://trac.webkit.org/changeset/97538>