From: Jie Fu Date: Wed, 17 May 2023 05:00:50 +0000 (+0800) Subject: [hwasan] Fix build breakage (-Wunused-function) in hwasan_interceptors.cpp (NFC) X-Git-Tag: upstream/17.0.6~8214 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=000aeb2499b1db510f064c37c097a5020215b835;p=platform%2Fupstream%2Fllvm.git [hwasan] Fix build breakage (-Wunused-function) in hwasan_interceptors.cpp (NFC) In file included from /data/llvm-project/compiler-rt/lib/hwasan/hwasan_interceptors.cpp:141: /data/llvm-project/compiler-rt/lib/hwasan/../sanitizer_common/sanitizer_common_interceptors.inc:1044:13: error: unused function 'write_iovec' [-Werror,-Wunused-function] static void write_iovec(void *ctx, struct __sanitizer_iovec *iovec, ^ /data/llvm-project/compiler-rt/lib/hwasan/../sanitizer_common/sanitizer_common_interceptors.inc:1053:13: error: unused function 'read_iovec' [-Werror,-Wunused-function] static void read_iovec(void *ctx, struct __sanitizer_iovec *iovec, ^ /data/llvm-project/compiler-rt/lib/hwasan/../sanitizer_common/sanitizer_common_interceptors.inc:10363:13: error: unused function 'InitializeCommonInterceptors' [-Werror,-Wunused-function] static void InitializeCommonInterceptors() { ^ 3 errors generated. --- diff --git a/compiler-rt/lib/hwasan/hwasan_interceptors.cpp b/compiler-rt/lib/hwasan/hwasan_interceptors.cpp index f5099c2..57df79d 100644 --- a/compiler-rt/lib/hwasan/hwasan_interceptors.cpp +++ b/compiler-rt/lib/hwasan/hwasan_interceptors.cpp @@ -138,7 +138,10 @@ using namespace __hwasan; (void)(name); \ } while (false) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-function" #include "sanitizer_common/sanitizer_common_interceptors.inc" +#pragma clang diagnostic pop struct ThreadStartArg { __sanitizer_sigset_t starting_sigset_;