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/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c
index a31dc0d..798ee6c 100644
--- a/helgrind/hg_intercepts.c
+++ b/helgrind/hg_intercepts.c
@@ -86,25 +86,21 @@
 
 #define DO_CREQ_v_W(_creqF, _ty1F,_arg1F)                \
    do {                                                  \
-      Word _unused_res __attribute__((unused));          \
       Word _arg1;                                        \
       assert(sizeof(_ty1F) == sizeof(Word));             \
       _arg1 = (Word)(_arg1F);                            \
-      VALGRIND_DO_CLIENT_REQUEST(_unused_res, 0,         \
-                                 (_creqF),               \
+      VALGRIND_DO_CLIENT_REQUEST_EXPR(0, (_creqF),       \
                                  _arg1, 0,0,0,0);        \
    } while (0)
 
 #define DO_CREQ_v_WW(_creqF, _ty1F,_arg1F, _ty2F,_arg2F) \
    do {                                                  \
-      Word _unused_res __attribute__((unused));          \
       Word _arg1, _arg2;                                 \
       assert(sizeof(_ty1F) == sizeof(Word));             \
       assert(sizeof(_ty2F) == sizeof(Word));             \
       _arg1 = (Word)(_arg1F);                            \
       _arg2 = (Word)(_arg2F);                            \
-      VALGRIND_DO_CLIENT_REQUEST(_unused_res, 0,         \
-                                 (_creqF),               \
+      VALGRIND_DO_CLIENT_REQUEST_EXPR(0, (_creqF),       \
                                  _arg1,_arg2,0,0,0);     \
    } while (0)
 
@@ -116,7 +112,7 @@
       assert(sizeof(_ty2F) == sizeof(Word));             \
       _arg1 = (Word)(_arg1F);                            \
       _arg2 = (Word)(_arg2F);                            \
-      VALGRIND_DO_CLIENT_REQUEST(_res, 2,                \
+      _res = VALGRIND_DO_CLIENT_REQUEST_EXPR(2,          \
                                  (_creqF),               \
                                  _arg1,_arg2,0,0,0);     \
       _resF = _res;                                      \
@@ -125,7 +121,6 @@
 #define DO_CREQ_v_WWW(_creqF, _ty1F,_arg1F,              \
                       _ty2F,_arg2F, _ty3F, _arg3F)       \
    do {                                                  \
-      Word _unused_res __attribute__((unused));          \
       Word _arg1, _arg2, _arg3;                          \
       assert(sizeof(_ty1F) == sizeof(Word));             \
       assert(sizeof(_ty2F) == sizeof(Word));             \
@@ -133,8 +128,7 @@
       _arg1 = (Word)(_arg1F);                            \
       _arg2 = (Word)(_arg2F);                            \
       _arg3 = (Word)(_arg3F);                            \
-      VALGRIND_DO_CLIENT_REQUEST(_unused_res, 0,         \
-                                 (_creqF),               \
+      VALGRIND_DO_CLIENT_REQUEST_EXPR(0, (_creqF),       \
                                  _arg1,_arg2,_arg3,0,0); \
    } while (0)