From ef3f44b639b786d857462a7bf8ca939447a3ceb4 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Thu, 5 Jan 2023 16:38:01 -0800 Subject: [PATCH] Disable tidy DeprecatedOrUnsafeBufferHandling check This check is disabled in global default, see build/soong/cc/config/tidy.go. This bpf_defaults is used to compile an external/bcc module. Unless all such warnings can be fixed in the external/bcc source, we should not enable this check locally. Test: presubmit; make tidy-external-bcc_subset Change-Id: I97f6dd944dfb21fed664175c5c7eec02c10ebe4c --- Android.bp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Android.bp b/Android.bp index c8c1681..b8cd7b3 100644 --- a/Android.bp +++ b/Android.bp @@ -28,9 +28,10 @@ cc_defaults { tidy_checks: [ "android-*", "cert-*", - "clang-analyzer-security*", "-cert-err34-c", "clang-analyzer-security*", + // Many calls to snprintf/sscanf/memset/memcpy in libbpf.c have the following warning. + "-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling", // Disabling due to many unavoidable warnings from POSIX API usage. "-google-runtime-int", ],