From f976f6c216f0cc80e27e1d38e7df5369595aa442 Mon Sep 17 00:00:00 2001 From: bart Date: Sun, 3 Apr 2011 17:42:19 +0000 Subject: git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11682 a5019735-40e9-0310-863c-91ae7b9d1cf9 --- helgrind/helgrind.h | 8 +++++--- helgrind/tests/tc18_semabuse.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'helgrind') diff --git a/helgrind/helgrind.h b/helgrind/helgrind.h index cbe09002..64271edd 100644 --- a/helgrind/helgrind.h +++ b/helgrind/helgrind.h @@ -144,7 +144,7 @@ typedef #define DO_CREQ_v_W(_creqF, _ty1F,_arg1F) \ do { \ - long int _unused_res, _arg1; \ + long _unused_res __attribute__((unused)), _arg1; \ /* assert(sizeof(_ty1F) == sizeof(long int)); */ \ _arg1 = (long int)(_arg1F); \ VALGRIND_DO_CLIENT_REQUEST(_unused_res, 0, \ @@ -165,7 +165,8 @@ typedef #define DO_CREQ_v_WW(_creqF, _ty1F,_arg1F, _ty2F,_arg2F) \ do { \ - long int _unused_res, _arg1, _arg2; \ + long _unused_res __attribute__((unused)); \ + long _arg1, _arg2; \ /* assert(sizeof(_ty1F) == sizeof(long int)); */ \ /* assert(sizeof(_ty2F) == sizeof(long int)); */ \ _arg1 = (long int)(_arg1F); \ @@ -178,7 +179,8 @@ typedef #define DO_CREQ_v_WWW(_creqF, _ty1F,_arg1F, \ _ty2F,_arg2F, _ty3F, _arg3F) \ do { \ - long int _unused_res, _arg1, _arg2, _arg3; \ + long _unused_res __attribute__((unused)); \ + long _arg1, _arg2, _arg3; \ /* assert(sizeof(_ty1F) == sizeof(long int)); */ \ /* assert(sizeof(_ty2F) == sizeof(long int)); */ \ /* assert(sizeof(_ty3F) == sizeof(long int)); */ \ diff --git a/helgrind/tests/tc18_semabuse.c b/helgrind/tests/tc18_semabuse.c index 40c068bd..7395251e 100644 --- a/helgrind/tests/tc18_semabuse.c +++ b/helgrind/tests/tc18_semabuse.c @@ -16,7 +16,7 @@ void start_watchdog ( void ); int main ( void ) { - int r; + int r __attribute__((unused)); sem_t s1; start_watchdog(); /* Do sem_init with huge initial count */ -- cgit v1.2.3