diff options
author | Michael Stahl <mstahl@redhat.com> | 2011-10-14 22:31:03 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2011-10-18 17:39:09 +0200 |
commit | e2934c43102eb6e6f46b238276fbe3b0274699a8 (patch) | |
tree | 57ecbf761bd7a92cd6ecf6caf2a3e60a9c3477ef /sal | |
parent | fa70d98e729c0dba44e1c8e25fe1323bad918945 (diff) |
sal: workaround warnings in valgrind macros
Diffstat (limited to 'sal')
-rw-r--r-- | sal/rtl/source/alloc_impl.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sal/rtl/source/alloc_impl.h b/sal/rtl/source/alloc_impl.h index 5e68edb06d7d..39bbbf6be985 100644 --- a/sal/rtl/source/alloc_impl.h +++ b/sal/rtl/source/alloc_impl.h @@ -260,6 +260,13 @@ typedef CRITICAL_SECTION rtl_memory_lock_type; #define VALGRIND_MEMPOOL_FREE(pool, addr) #elif defined(HAVE_MEMCHECK_H) #include <memcheck.h> +/* valgrind macros contain unused variables... */ +#define GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) +#if GCC_VERSION >= 40201 +#pragma GCC diagnostic warning "-Wunused-but-set-variable" +#endif #endif /* NVALGRIND || HAVE_MEMCHECK_H */ typedef enum { AMode_CUSTOM, AMode_SYSTEM, AMode_UNSET } AllocMode; |