diff options
| author | Ralph Giles <[email protected]> | 2011-05-04 23:19:38 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-05-05 10:55:54 -0700 |
| commit | 06f071390697270a8342daeb41cb0fe790f65181 (patch) | |
| tree | a43e5bb61c2e3a5b4ed217446a8e2b4198948019 /src/rt/memcheck.h | |
| parent | rustc: Add a Link module; move crate writing to it to slim down trans slightly (diff) | |
| download | rust-06f071390697270a8342daeb41cb0fe790f65181.tar.xz rust-06f071390697270a8342daeb41cb0fe790f65181.zip | |
Mark valgrind's _qzz_res as unused to silence warnings on gcc 4.6.
This applies c11675 by Julian Seward from valgrind trunk
(svn://svn.valgrind.org/valgrind/trunk) to rustrt's included
copies of memcheck.h and valgrind.h, effectively backporting
the fix from the unreleased 3.6.2. The commit simply applies
the gcc 'unused' attribute to the relevant declarations.
This change allows compilation of the runtime code under
gcc 4.6 with -Werror, as the makefile currently requests.
Diffstat (limited to 'src/rt/memcheck.h')
| -rw-r--r-- | src/rt/memcheck.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rt/memcheck.h b/src/rt/memcheck.h index bf95491b..58480256 100644 --- a/src/rt/memcheck.h +++ b/src/rt/memcheck.h @@ -184,7 +184,7 @@ typedef /* Do a full memory leak check (like --leak-check=full) mid-execution. */ #define VALGRIND_DO_LEAK_CHECK \ - {unsigned long _qzz_res; \ + {unsigned long _qzz_res __attribute((unused)); \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \ VG_USERREQ__DO_LEAK_CHECK, \ 0, 0, 0, 0, 0); \ @@ -192,7 +192,7 @@ typedef /* Do a summary memory leak check (like --leak-check=summary) mid-execution. */ #define VALGRIND_DO_QUICK_LEAK_CHECK \ - {unsigned long _qzz_res; \ + {unsigned long _qzz_res __attribute((unused)); \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \ VG_USERREQ__DO_LEAK_CHECK, \ 1, 0, 0, 0, 0); \ @@ -207,7 +207,7 @@ typedef are. We also initialise '_qzz_leaked', etc because VG_USERREQ__COUNT_LEAKS doesn't mark the values returned as defined. */ \ - {unsigned long _qzz_res; \ + {unsigned long _qzz_res __attribute((unused)); \ unsigned long _qzz_leaked = 0, _qzz_dubious = 0; \ unsigned long _qzz_reachable = 0, _qzz_suppressed = 0; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \ @@ -229,7 +229,7 @@ typedef are. We also initialise '_qzz_leaked', etc because VG_USERREQ__COUNT_LEAKS doesn't mark the values returned as defined. */ \ - {unsigned long _qzz_res; \ + {unsigned long _qzz_res __attribute((unused)); \ unsigned long _qzz_leaked = 0, _qzz_dubious = 0; \ unsigned long _qzz_reachable = 0, _qzz_suppressed = 0; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \ |