From 211364c21e7f757ae1acf4e72b5df39c498fb88b Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 12 Jul 2021 20:18:46 +0000 Subject: [PATCH] linux-user/syscall: Remove unused variable from execve From clang-13: linux-user/syscall.c:8503:17: error: variable 'total_size' set but not used \ [-Werror,-Wunused-but-set-variable] Acked-by: Laurent Vivier Signed-off-by: Richard Henderson --- linux-user/syscall.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 376629c689..ccd3892b2d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8364,7 +8364,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, abi_ulong guest_envp; abi_ulong addr; char **q; - int total_size = 0; argc = 0; guest_argp = arg2; @@ -8396,7 +8395,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, break; if (!(*q = lock_user_string(addr))) goto execve_efault; - total_size += strlen(*q) + 1; } *q = NULL; @@ -8408,7 +8406,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, break; if (!(*q = lock_user_string(addr))) goto execve_efault; - total_size += strlen(*q) + 1; } *q = NULL;