]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Compiles now cleanly without -Wno-empty-body.
authorBart Van Assche <bvanassche@acm.org>
Wed, 3 Jun 2009 20:02:29 +0000 (20:02 +0000)
committerBart Van Assche <bvanassche@acm.org>
Wed, 3 Jun 2009 20:02:29 +0000 (20:02 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10234

drd/tests/Makefile.am
drd/tests/tsan_unittest.cpp

index 8cb44946508927e4f543511a8b719f02e08976a3..ceaec5413be76aa9af8673dd5d8e4688afba5010 100644 (file)
@@ -294,7 +294,7 @@ new_delete_SOURCES          = new_delete.cpp
 tsan_unittest_SOURCES       = tsan_unittest.cpp
 tsan_unittest_CXXFLAGS      = $(AM_CXXFLAGS) \
                        -DTHREAD_WRAPPERS='"tsan_thread_wrappers_pthread.h"' \
-                       -Wno-sign-compare -Wno-shadow @FLAG_W_NO_EMPTY_BODY@
+                       -Wno-sign-compare -Wno-shadow
 
 if HAVE_BOOST_1_35
 boost_thread_SOURCES        = boost_thread.cpp
index 9dd28dadf2d9dd4373dda1a9f7d86a46bc96b391..c3d4ec47912d82dd0e175fea7eb23d6789a8e16a 100644 (file)
 // Helgrind memory usage testing stuff
 // If not present in dynamic_annotations.h/.cc - ignore
 #ifndef ANNOTATE_RESET_STATS
-#define ANNOTATE_RESET_STATS()
+#define ANNOTATE_RESET_STATS() do { } while(0)
 #endif
 #ifndef ANNOTATE_PRINT_STATS
-#define ANNOTATE_PRINT_STATS()
+#define ANNOTATE_PRINT_STATS() do { } while(0)
 #endif
 #ifndef ANNOTATE_PRINT_MEMORY_USAGE
-#define ANNOTATE_PRINT_MEMORY_USAGE(a)
+#define ANNOTATE_PRINT_MEMORY_USAGE(a) do { } while(0)
 #endif
 //
 
@@ -2833,14 +2833,16 @@ int     FLAG2 = 0;
 void Worker2() {
   FLAG1=GLOB2;
 
-  while(!FLAG2);
+  while(!FLAG2)
+    ;
   GLOB2=FLAG2;
 }
 
 void Worker1() {
   FLAG2=GLOB1;
 
-  while(!FLAG1);
+  while(!FLAG1)
+    ;
   GLOB1=FLAG1;
 }