diff options
author | Thurston Dang <thurston@google.com> | 2023-05-17 03:22:09 +0000 |
---|---|---|
committer | Thurston Dang <thurston@google.com> | 2023-05-17 03:22:09 +0000 |
commit | cae7ef260458f66b4c6b2b8075db7cb6afe6bf9e (patch) | |
tree | d94f14a83919545106927f1273e89fd08d009251 /compiler-rt | |
parent | 744b12adb4ec7467a038b75a7fd63dd70e9dca14 (diff) | |
download | llvm-cae7ef260458f66b4c6b2b8075db7cb6afe6bf9e.tar.gz |
hwasan: fix buildbot breakage (unused variables)
This (hopefully) fixes the buildbot breakage:
https://lab.llvm.org/buildbot/#/builders/77/builds/26793
My patch, https://reviews.llvm.org/D150708 introduced
stubs for common interceptor macros; these had unused
variables. This patch suppresses unused-variable
warnings.
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/lib/hwasan/hwasan_interceptors.cpp | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/compiler-rt/lib/hwasan/hwasan_interceptors.cpp b/compiler-rt/lib/hwasan/hwasan_interceptors.cpp index 97630407f7a5..f5099c2a835f 100644 --- a/compiler-rt/lib/hwasan/hwasan_interceptors.cpp +++ b/compiler-rt/lib/hwasan/hwasan_interceptors.cpp @@ -51,50 +51,82 @@ using namespace __hwasan; #define COMMON_INTERCEPTOR_READ_RANGE(ctx, ptr, size) \ do { \ + (void)(ctx); \ + (void)(ptr); \ + (void)(size); \ } while (false) #define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \ do { \ + (void)(ctx); \ + (void)(func); \ } while (false) #define COMMON_INTERCEPTOR_DIR_ACQUIRE(ctx, path) \ - do { \ + do { \ + (void)(ctx); \ + (void)(path); \ } while (false) #define COMMON_INTERCEPTOR_FD_ACQUIRE(ctx, fd) \ do { \ + (void)(ctx); \ + (void)(fd); \ } while (false) #define COMMON_INTERCEPTOR_FD_RELEASE(ctx, fd) \ do { \ + (void)(ctx); \ + (void)(fd); \ } while (false) #define COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx, fd, newfd) \ do { \ + (void)(ctx); \ + (void)(fd); \ + (void)(newfd); \ } while (false) #define COMMON_INTERCEPTOR_SET_THREAD_NAME(ctx, name) \ do { \ + (void)(ctx); \ + (void)(name); \ } while (false) #define COMMON_INTERCEPTOR_SET_PTHREAD_NAME(ctx, thread, name) \ do { \ + (void)(ctx); \ + (void)(thread); \ + (void)(name); \ } while (false) #define COMMON_INTERCEPTOR_BLOCK_REAL(name) \ do { \ + (void)(name); \ } while (false) #define COMMON_INTERCEPTOR_MEMMOVE_IMPL(ctx, to, from, size) \ do { \ + (void)(ctx); \ + (void)(to); \ + (void)(from); \ + (void)(size); \ } while (false) #define COMMON_INTERCEPTOR_MEMCPY_IMPL(ctx, to, from, size) \ do { \ + (void)(ctx); \ + (void)(to); \ + (void)(from); \ + (void)(size); \ } while (false) #define COMMON_INTERCEPTOR_MEMSET_IMPL(ctx, block, c, size) \ do { \ + (void)(ctx); \ + (void)(block); \ + (void)(c); \ + (void)(size); \ } while (false) #define COMMON_INTERCEPTOR_STRERROR() \ @@ -103,6 +135,7 @@ using namespace __hwasan; #define COMMON_INTERCEPT_FUNCTION(name) \ do { \ + (void)(name); \ } while (false) #include "sanitizer_common/sanitizer_common_interceptors.inc" |