Title: [109138] trunk/Source/_javascript_Core
Revision
109138
Author
[email protected]
Date
2012-02-28 12:28:56 -0800 (Tue, 28 Feb 2012)

Log Message

Fix build with newer versions of clang.

Clang now warns since we're not passing a CFString literal to CFStringCreateWithFormatAndArguments,
but it's OK to ignore this warning since clang is also checking that the caller (vprintf_stderr_common)
takes a string literal.

* wtf/Assertions.cpp:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (109137 => 109138)


--- trunk/Source/_javascript_Core/ChangeLog	2012-02-28 20:28:53 UTC (rev 109137)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-02-28 20:28:56 UTC (rev 109138)
@@ -1,3 +1,13 @@
+2012-02-28  Anders Carlsson  <[email protected]>
+
+        Fix build with newer versions of clang.
+
+        Clang now warns since we're not passing a CFString literal to CFStringCreateWithFormatAndArguments,
+        but it's OK to ignore this warning since clang is also checking that the caller (vprintf_stderr_common)
+        takes a string literal.
+
+        * wtf/Assertions.cpp:
+
 2012-02-28  Mario Sanchez Prada  <[email protected]>
 
         [GTK] Add GMainLoop and GMainContext to be handled by GRefPtr

Modified: trunk/Source/_javascript_Core/wtf/Assertions.cpp (109137 => 109138)


--- trunk/Source/_javascript_Core/wtf/Assertions.cpp	2012-02-28 20:28:53 UTC (rev 109137)
+++ trunk/Source/_javascript_Core/wtf/Assertions.cpp	2012-02-28 20:28:56 UTC (rev 109138)
@@ -70,8 +70,15 @@
 #if PLATFORM(MAC)
     if (strstr(format, "%@")) {
         CFStringRef cfFormat = CFStringCreateWithCString(NULL, format, kCFStringEncodingUTF8);
+
+#if COMPILER(CLANG)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat-nonliteral"
+#endif
         CFStringRef str = CFStringCreateWithFormatAndArguments(NULL, NULL, cfFormat, args);
-
+#if COMPILER(CLANG)
+#pragma clang diagnostic pop
+#endif
         int length = CFStringGetMaximumSizeForEncoding(CFStringGetLength(str), kCFStringEncodingUTF8);
         char* buffer = (char*)malloc(length + 1);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to