linux-user/syscall: Remove unused variable from execve
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 12 Jul 2021 20:18:46 +0000 (20:18 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 26 Jul 2021 17:07:28 +0000 (07:07 -1000)
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 <laurent@vivier.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
linux-user/syscall.c

index 376629c68915683144a5585500545513dbdbafd3..ccd3892b2df7ab1261d6c736afeffec0ec6dbde0 100644 (file)
@@ -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;