stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r480774 - /incubator/stdcxx/trunk/tests/self/0.printf.cpp
Date Wed, 29 Nov 2006 23:52:46 GMT
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  <sebor@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 */
 
 /***********************************************************************/
 



Mime
View raw message