From 3d010fa6c38290eb00db1c9916d113b84d65dbc4 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 11 Mar 2020 11:59:39 +0100 Subject: executor: fix clang-tidy warnings --- executor/common.h | 2 +- executor/common_linux.h | 6 ++++-- executor/test.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'executor') diff --git a/executor/common.h b/executor/common.h index 7f03eac8c..c79221de2 100644 --- a/executor/common.h +++ b/executor/common.h @@ -42,7 +42,7 @@ NORETURN void doexit(int status) #if SYZ_EXECUTOR || SYZ_MULTI_PROC || SYZ_REPEAT && SYZ_CGROUPS || \ SYZ_NET_DEVICES || __NR_syz_mount_image || __NR_syz_read_part_table || \ __NR_syz_usb_connect || (GOOS_freebsd || GOOS_openbsd || GOOS_netbsd) && SYZ_NET_INJECTION -unsigned long long procid; +static unsigned long long procid; #endif #if !GOOS_fuchsia && !GOOS_windows diff --git a/executor/common_linux.h b/executor/common_linux.h index 64dff5a15..3f8a5bc6d 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -2485,7 +2485,7 @@ static void setup_cgroups_test() #endif #if SYZ_EXECUTOR || SYZ_SANDBOX_NAMESPACE -void initialize_cgroups() +static void initialize_cgroups() { #if SYZ_EXECUTOR if (!flag_cgroups) @@ -2607,8 +2607,10 @@ static void sandbox_common() for (i = 0; i < sizeof(sysctls) / sizeof(sysctls[0]); i++) write_file(sysctls[i].name, sysctls[i].value); } +#endif -int wait_for_loop(int pid) +#if SYZ_EXECUTOR || SYZ_SANDBOX_NONE || SYZ_SANDBOX_SETUID || SYZ_SANDBOX_NAMESPACE +static int wait_for_loop(int pid) { if (pid < 0) fail("sandbox fork failed"); diff --git a/executor/test.h b/executor/test.h index c39f611d1..52506a51d 100644 --- a/executor/test.h +++ b/executor/test.h @@ -206,7 +206,7 @@ static struct { #endif }; -int run_tests() +static int run_tests() { int ret = 0; for (size_t i = 0; i < ARRAY_SIZE(tests); i++) { -- cgit mrf-deployment