Title: [101857] trunk/Tools
Revision
101857
Author
[email protected]
Date
2011-12-02 14:42:23 -0800 (Fri, 02 Dec 2011)

Log Message

[Chromium] Fix compilation warnings for ASSERT()
https://bugs.webkit.org/show_bug.cgi?id=73623

Reviewed by Tony Chang.

* DumpRenderTree/chromium/ImageDiff.cpp:
 - Fix fprintf format: %s -> %d for __LINE__
 - Do nothing for ASSERT() if NDEBUG.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (101856 => 101857)


--- trunk/Tools/ChangeLog	2011-12-02 22:37:13 UTC (rev 101856)
+++ trunk/Tools/ChangeLog	2011-12-02 22:42:23 UTC (rev 101857)
@@ -1,3 +1,14 @@
+2011-12-02  Kent Tamura  <[email protected]>
+
+        [Chromium] Fix compilation warnings for ASSERT()
+        https://bugs.webkit.org/show_bug.cgi?id=73623
+
+        Reviewed by Tony Chang.
+
+        * DumpRenderTree/chromium/ImageDiff.cpp:
+         - Fix fprintf format: %s -> %d for __LINE__
+         - Do nothing for ASSERT() if NDEBUG.
+
 2011-12-02  Eric Seidel  <[email protected]>
 
         Enable parallel testing for all Mac bots.

Modified: trunk/Tools/DumpRenderTree/chromium/ImageDiff.cpp (101856 => 101857)


--- trunk/Tools/DumpRenderTree/chromium/ImageDiff.cpp	2011-12-02 22:37:13 UTC (rev 101856)
+++ trunk/Tools/DumpRenderTree/chromium/ImageDiff.cpp	2011-12-02 22:42:23 UTC (rev 101857)
@@ -50,12 +50,16 @@
 #endif
 
 // Define macro here to make ImageDiff independent of _javascript_Core.
+#ifdef NDEBUG
+#define ASSERT(assertion) do { } while (0)
+#else
 #define ASSERT(assertion) do \
     if (!(assertion)) { \
-        fprintf(stderr, "ASSERT failed at %s:%s: " #assertion ".", __FILE__, __LINE__); \
+        fprintf(stderr, "ASSERT failed at %s:%d: " #assertion ".", __FILE__, __LINE__); \
         exit(1); \
     } \
 while (0)
+#endif
 
 using namespace std;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to