From: Bart Van Assche Date: Wed, 3 Jun 2009 20:02:29 +0000 (+0000) Subject: Compiles now cleanly without -Wno-empty-body. X-Git-Tag: svn/VALGRIND_3_5_0~546 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffc036b223ed77644df56ea1c36eb5370cbb0058;p=thirdparty%2Fvalgrind.git Compiles now cleanly without -Wno-empty-body. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10234 --- diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am index 8cb4494650..ceaec5413b 100644 --- a/drd/tests/Makefile.am +++ b/drd/tests/Makefile.am @@ -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 diff --git a/drd/tests/tsan_unittest.cpp b/drd/tests/tsan_unittest.cpp index 9dd28dadf2..c3d4ec4791 100644 --- a/drd/tests/tsan_unittest.cpp +++ b/drd/tests/tsan_unittest.cpp @@ -60,13 +60,13 @@ // 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; }