Get rid of the remaining "set but not used" warnings reported by gcc 4.6 by
swapping the roles of the VALGRIND_DO_CLIENT_REQUEST() and
VALGRIND_DO_CLIENT_REQUEST_EXPR() macros. Also, many __attribute__((unused))
declarations on variables have been eliminated. Closes #269778.
Note: so far this patch has been tested on x86/Linux, amd64/Linux and
ppc64/Linux but not yet on any other supported CPU/OS combination.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11755 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/drd/drd.h b/drd/drd.h
index 3f4ffc5..55f7227 100644
--- a/drd/drd.h
+++ b/drd/drd.h
@@ -66,13 +66,15 @@
/** Obtain the thread ID assigned by Valgrind's core. */
-#define DRD_GET_VALGRIND_THREADID \
- VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__DRD_GET_VALGRIND_THREAD_ID, \
+#define DRD_GET_VALGRIND_THREADID \
+ (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, \
+ VG_USERREQ__DRD_GET_VALGRIND_THREAD_ID, \
0, 0, 0, 0, 0)
/** Obtain the thread ID assigned by DRD. */
-#define DRD_GET_DRD_THREADID \
- VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__DRD_GET_DRD_THREAD_ID, \
+#define DRD_GET_DRD_THREADID \
+ (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, \
+ VG_USERREQ__DRD_GET_DRD_THREAD_ID, \
0, 0, 0, 0, 0)