diff options
Diffstat (limited to 'src/sanity.h')
-rw-r--r-- | src/sanity.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/sanity.h b/src/sanity.h index 3f6020b..89d0e4f 100644 --- a/src/sanity.h +++ b/src/sanity.h @@ -20,11 +20,6 @@ #define SANITIZE_CALL__(macro, ptr, size, ...) \ macro(ptr, size) -/** - * Squelch unused variable warnings when not sanitizing. - */ -#define sanitize_ignore(ptr, size) ((void)(ptr), (void)(size)) - #if __SANITIZE_ADDRESS__ # include <sanitizer/asan_interface.h> @@ -43,8 +38,8 @@ #define sanitize_free(...) SANITIZE_CALL(__asan_poison_memory_region, __VA_ARGS__) #else -# define sanitize_alloc(...) SANITIZE_CALL(sanitize_ignore, __VA_ARGS__) -# define sanitize_free(...) SANITIZE_CALL(sanitize_ignore, __VA_ARGS__) +# define sanitize_alloc(...) ((void)0) +# define sanitize_free(...) ((void)0) #endif #if __SANITIZE_MEMORY__ @@ -65,8 +60,8 @@ #define sanitize_uninit(...) SANITIZE_CALL(__msan_allocated_memory, __VA_ARGS__) #else -# define sanitize_init(...) SANITIZE_CALL(sanitize_ignore, __VA_ARGS__) -# define sanitize_uninit(...) SANITIZE_CALL(sanitize_ignore, __VA_ARGS__) +# define sanitize_init(...) ((void)0) +# define sanitize_uninit(...) ((void)0) #endif /** |