diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-03-11 11:59:39 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-03-11 11:59:39 +0100 |
| commit | 3d010fa6c38290eb00db1c9916d113b84d65dbc4 (patch) | |
| tree | 7e44f9d771f09e5ba4b81b042ac4a542895ecd72 | |
| parent | e103bc9e1bb4453045c4795f9a10a671e72b1aba (diff) | |
executor: fix clang-tidy warnings
| -rw-r--r-- | executor/common.h | 2 | ||||
| -rw-r--r-- | executor/common_linux.h | 6 | ||||
| -rw-r--r-- | executor/test.h | 2 | ||||
| -rw-r--r-- | pkg/csource/generated.go | 8 |
4 files changed, 11 insertions, 7 deletions
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++) { diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go index e7c2967e2..8661266e8 100644 --- a/pkg/csource/generated.go +++ b/pkg/csource/generated.go @@ -36,7 +36,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 @@ -5541,7 +5541,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) @@ -5656,8 +5656,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"); |
