|
From: <sv...@va...> - 2009-06-03 20:02:37
|
Author: bart
Date: 2009-06-03 21:02:29 +0100 (Wed, 03 Jun 2009)
New Revision: 10234
Log:
Compiles now cleanly without -Wno-empty-body.
Modified:
trunk/drd/tests/Makefile.am
trunk/drd/tests/tsan_unittest.cpp
Modified: trunk/drd/tests/Makefile.am
===================================================================
--- trunk/drd/tests/Makefile.am 2009-06-03 20:01:44 UTC (rev 10233)
+++ trunk/drd/tests/Makefile.am 2009-06-03 20:02:29 UTC (rev 10234)
@@ -294,7 +294,7 @@
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
Modified: trunk/drd/tests/tsan_unittest.cpp
===================================================================
--- trunk/drd/tests/tsan_unittest.cpp 2009-06-03 20:01:44 UTC (rev 10233)
+++ trunk/drd/tests/tsan_unittest.cpp 2009-06-03 20:02:29 UTC (rev 10234)
@@ -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 @@
void Worker2() {
FLAG1=GLOB2;
- while(!FLAG2);
+ while(!FLAG2)
+ ;
GLOB2=FLAG2;
}
void Worker1() {
FLAG2=GLOB1;
- while(!FLAG1);
+ while(!FLAG1)
+ ;
GLOB1=FLAG1;
}
|