Diff
Modified: trunk/Source/WebCore/ChangeLog (109662 => 109663)
--- trunk/Source/WebCore/ChangeLog 2012-03-03 18:55:49 UTC (rev 109662)
+++ trunk/Source/WebCore/ChangeLog 2012-03-03 19:13:56 UTC (rev 109663)
@@ -1,3 +1,27 @@
+2012-03-03 Anders Carlsson <[email protected]>
+
+ Fix build with newer versions of clang.
+
+ * bindings/objc/DOM.mm:
+ (-[DOMNode description]):
+ Remove an unused parameter.
+
+ * bridge/objc/objc_instance.mm:
+ (ObjcInstance::getClass):
+ Use object_getClass instead of accessing isa directly.
+
+ * platform/LocalizedStrings.cpp:
+ (WebCore::formatLocalizedString):
+ Disable the -Wformat-nonliteral warning around the call to CFStringCreateWithFormatAndArguments.
+
+ * platform/graphics/mac/WebLayer.mm:
+ (-[CALayer _descriptionWithPrefix:]):
+ Use %p for the CALayer pointer, and use %lu for the number of sublayers.
+
+ * platform/mac/HTMLConverter.mm:
+ (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
+ Cast the NSAttachmentCharacte enum to unichar.
+
2012-03-03 Sheriff Bot <[email protected]>
Unreviewed, rolling out r109343.
Modified: trunk/Source/WebCore/bindings/objc/DOM.mm (109662 => 109663)
--- trunk/Source/WebCore/bindings/objc/DOM.mm 2012-03-03 18:55:49 UTC (rev 109662)
+++ trunk/Source/WebCore/bindings/objc/DOM.mm 2012-03-03 19:13:56 UTC (rev 109663)
@@ -264,7 +264,7 @@
- (NSString *)description
{
if (!_internal)
- return [NSString stringWithFormat:@"<%@: null>", [[self class] description], self];
+ return [NSString stringWithFormat:@"<%@: null>", [[self class] description]];
NSString *value = [self nodeValue];
if (value)
Modified: trunk/Source/WebCore/bridge/objc/objc_instance.mm (109662 => 109663)
--- trunk/Source/WebCore/bridge/objc/objc_instance.mm 2012-03-03 18:55:49 UTC (rev 109662)
+++ trunk/Source/WebCore/bridge/objc/objc_instance.mm 2012-03-03 19:13:56 UTC (rev 109663)
@@ -170,7 +170,7 @@
if (!_instance)
return 0;
if (!_class)
- _class = ObjcClass::classForIsA(_instance->isa);
+ _class = ObjcClass::classForIsA(object_getClass(_instance.get()));
return static_cast<Bindings::Class*>(_class);
}
Modified: trunk/Source/WebCore/platform/LocalizedStrings.cpp (109662 => 109663)
--- trunk/Source/WebCore/platform/LocalizedStrings.cpp 2012-03-03 18:55:49 UTC (rev 109662)
+++ trunk/Source/WebCore/platform/LocalizedStrings.cpp 2012-03-03 19:13:56 UTC (rev 109663)
@@ -48,13 +48,22 @@
// 2) It doesn't handle the %2$d syntax.
// Note that because |format| is used as the second parameter to va_start, it cannot be a reference
// type according to section 18.7/3 of the C++ N1905 standard.
-static String formatLocalizedString(String format, ...)
+static String formatLocalizedString(const String& format, ...)
{
#if USE(CF)
va_list arguments;
va_start(arguments, format);
RetainPtr<CFStringRef> formatCFString(AdoptCF, format.createCFString());
+
+#if COMPILER(CLANG)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat-nonliteral"
+#endif
RetainPtr<CFStringRef> result(AdoptCF, CFStringCreateWithFormatAndArguments(0, 0, formatCFString.get(), arguments));
+#if COMPILER(CLANG)
+#pragma clang diagnostic pop
+#endif
+
va_end(arguments);
return result.get();
#else
Modified: trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm (109662 => 109663)
--- trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm 2012-03-03 18:55:49 UTC (rev 109662)
+++ trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm 2012-03-03 19:13:56 UTC (rev 109663)
@@ -210,14 +210,14 @@
CGRect aBounds = [self bounds];
CGPoint aPos = [self position];
- NSString* selfString = [NSString stringWithFormat:@"%@<%@ 0x%08x> \"%@\" bounds(%.1f, %.1f, %.1f, %.1f) pos(%.1f, %.1f), sublayers=%d masking=%d",
+ NSString* selfString = [NSString stringWithFormat:@"%@<%@ 0x%p> \"%@\" bounds(%.1f, %.1f, %.1f, %.1f) pos(%.1f, %.1f), sublayers=%lu masking=%d",
inPrefix,
[self class],
self,
[self name],
aBounds.origin.x, aBounds.origin.y, aBounds.size.width, aBounds.size.height,
aPos.x, aPos.y,
- [[self sublayers] count],
+ static_cast<unsigned long>([[self sublayers] count]),
[self masksToBounds]];
NSMutableString* curDesc = [NSMutableString stringWithString:selfString];
Modified: trunk/Source/WebCore/platform/mac/HTMLConverter.mm (109662 => 109663)
--- trunk/Source/WebCore/platform/mac/HTMLConverter.mm 2012-03-03 18:55:49 UTC (rev 109662)
+++ trunk/Source/WebCore/platform/mac/HTMLConverter.mm 2012-03-03 19:13:56 UTC (rev 109663)
@@ -818,7 +818,7 @@
NSUInteger textLength = [_attrStr length];
NSTextAttachment *attachment = [[NSTextAttachment alloc] initWithFileWrapper:fileWrapper];
NSTextAttachmentCell *cell;
- NSString *string = [[NSString alloc] initWithFormat:(needsParagraph ? @"%C\n" : @"%C"), NSAttachmentCharacter];
+ NSString *string = [[NSString alloc] initWithFormat:(needsParagraph ? @"%C\n" : @"%C"), static_cast<unichar>(NSAttachmentCharacter)];
NSRange rangeToReplace = NSMakeRange(textLength, 0);
NSDictionary *attrs;
if (fileWrapper) {
Modified: trunk/Source/WebKit/mac/ChangeLog (109662 => 109663)
--- trunk/Source/WebKit/mac/ChangeLog 2012-03-03 18:55:49 UTC (rev 109662)
+++ trunk/Source/WebKit/mac/ChangeLog 2012-03-03 19:13:56 UTC (rev 109663)
@@ -1,3 +1,15 @@
+2012-03-03 Anders Carlsson <[email protected]>
+
+ Fix build with newer versions of clang.
+
+ * Panels/WebAuthenticationPanel.m:
+ (-[WebAuthenticationPanel setUpForChallenge:]):
+ Use %ld and cast to long.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView getVariable:value:]):
+ Cast the switch parameter to unsigned to prevent warnings about case values not being part of the enum type.
+
2012-03-01 Nikolas Zimmermann <[email protected]>
Unreviewed, rolling out r109255.
Modified: trunk/Source/WebKit/mac/Panels/WebAuthenticationPanel.m (109662 => 109663)
--- trunk/Source/WebKit/mac/Panels/WebAuthenticationPanel.m 2012-03-03 18:55:49 UTC (rev 109662)
+++ trunk/Source/WebKit/mac/Panels/WebAuthenticationPanel.m 2012-03-03 19:13:56 UTC (rev 109663)
@@ -125,7 +125,7 @@
if ([space port] == 0) {
host = [[space host] _web_decodeHostName];
} else {
- host = [NSString stringWithFormat:@"%@:%u", [[space host] _web_decodeHostName], [space port]];
+ host = [NSString stringWithFormat:@"%@:%ld", [[space host] _web_decodeHostName], (long)[space port]];
}
NSString *realm = [space realm];
Modified: trunk/Source/WebKit/mac/Plugins/WebNetscapePluginView.mm (109662 => 109663)
--- trunk/Source/WebKit/mac/Plugins/WebNetscapePluginView.mm 2012-03-03 18:55:49 UTC (rev 109662)
+++ trunk/Source/WebKit/mac/Plugins/WebNetscapePluginView.mm 2012-03-03 19:13:56 UTC (rev 109663)
@@ -1998,7 +1998,7 @@
- (NPError)getVariable:(NPNVariable)variable value:(void *)value
{
- switch (variable) {
+ switch (static_cast<unsigned>(variable)) {
case NPNVWindowNPObject:
{
Frame* frame = core([self webFrame]);
Modified: trunk/Source/WebKit2/ChangeLog (109662 => 109663)
--- trunk/Source/WebKit2/ChangeLog 2012-03-03 18:55:49 UTC (rev 109662)
+++ trunk/Source/WebKit2/ChangeLog 2012-03-03 19:13:56 UTC (rev 109663)
@@ -1,3 +1,11 @@
+2012-03-03 Anders Carlsson <[email protected]>
+
+ Fix build with newer versions of clang.
+
+ * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
+ (WebKit::NPN_GetValue):
+ Cast the switch parameter to unsigned to prevent warnings about case values not being part of the enum type.
+
2012-03-02 Andy Estes <[email protected]>
Move nsStringFromWebCoreString out of PageClientImpl
Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp (109662 => 109663)
--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp 2012-03-03 18:55:49 UTC (rev 109662)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp 2012-03-03 19:13:56 UTC (rev 109663)
@@ -424,7 +424,7 @@
static NPError NPN_GetValue(NPP npp, NPNVariable variable, void *value)
{
- switch (variable) {
+ switch (static_cast<unsigned>(variable)) {
case NPNVWindowNPObject: {
RefPtr<NetscapePlugin> plugin = NetscapePlugin::fromNPP(npp);
PluginDestructionProtector protector(plugin.get());