Fix unused variable warning on macOS + ASan

On non-ELF platforms, WEAK_SYMBOL_FUNC expands to a static variable. On
ASan, we don't use sdallocx. Clang then warns about an unused static
variable. Silence the warning.

Change-Id: I3d53519b669d435f3801f45e4b72c6ca4cd27a3b
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/53565
Reviewed-by: Bob Beck <bbe@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
This commit is contained in:
David Benjamin 2022-07-19 19:39:53 -04:00 committed by Boringssl LUCI CQ
parent 4d7b383e98
commit 28883d4d81

View File

@ -183,6 +183,7 @@ void OPENSSL_free(void *orig_ptr) {
// ASan knows to intercept malloc and free, but not sdallocx.
#if defined(OPENSSL_ASAN)
(void)sdallocx;
free(ptr);
#else
if (sdallocx) {