From 7284e19b32d2ddcda284059b312ef818371bc49b Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Fri, 3 Sep 2021 16:39:29 -0700 Subject: [PATCH] Suppress clang-tidy warnings for uses of bzero() The only uses of bzero() in the maiko sources come about because it is used in the macOS definition of the FD_ZERO() macro in sys/select.h. Suppress the warning by including -clang-analyzer-security.insecureAPI.bzero in the clang-tidy list of checks. This may well have been replaced by a memset() call in more up-to-date macOS releases. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 821b305..6da07f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ IF (CLANG_TIDY_EXE) # There are many many warnings for strcpy instances to deal with, # but suppress it for now so that other issues are more obvious # - SET(CMAKE_C_CLANG_TIDY ${CLANG_TIDY_EXE} -checks=-*,cert-*,clang-analyzer-security.*,-clang-analyzer-security.insecureAPI.strcpy -header-filter=.*) + SET(CMAKE_C_CLANG_TIDY ${CLANG_TIDY_EXE} -checks=-*,cert-*,clang-analyzer-security.*,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-security.insecureAPI.bzero -header-filter=.*) ENDIF() INCLUDE(CheckLibraryExists)