You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2006/11/30 00:52:46 UTC

svn commit: r480774 - /incubator/stdcxx/trunk/tests/self/0.printf.cpp

Author: sebor
Date: Wed Nov 29 15:52:45 2006
New Revision: 480774

URL: http://svn.apache.org/viewvc?view=rev&rev=480774
Log:
2006-11-29  Martin Sebor  <se...@roguewave.com>

	* printf.cpp (TEST_SPEC): Avoided the use of a conditional
	intended to always evaluate to the same value except at
	runtime in order to prevent compiler warnings.

Modified:
    incubator/stdcxx/trunk/tests/self/0.printf.cpp

Modified: incubator/stdcxx/trunk/tests/self/0.printf.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/self/0.printf.cpp?view=diff&rev=480774&r1=480773&r2=480774
==============================================================================
--- incubator/stdcxx/trunk/tests/self/0.printf.cpp (original)
+++ incubator/stdcxx/trunk/tests/self/0.printf.cpp Wed Nov 29 15:52:45 2006
@@ -120,7 +120,7 @@
 
 #undef TEST_SPEC
 #define TEST_SPEC(pfx, a1, a2, a3, expect)                              \
-    do {                                                                \
+    {                                                                   \
         ++ntests;                                                       \
         char fmt [64];                                                  \
         sprintf (fmt, "%s%c", pfx, spec);                               \
@@ -141,9 +141,7 @@
                     (long)a1, (long)a2, (long)a3, buf, s0);             \
         }                                                               \
         free (s0);                                                      \
-        RW_ASSERT (0 < ntests);                                         \
-        /* avoid EDG constant controlling expression warnings  */       \
-    } while (0 == ntests /* always false */)
+    } (void)0 /* require semicolon after macro invocation */
 
 /***********************************************************************/