summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-07-12 20:18:46 +0000
committerRichard Henderson <richard.henderson@linaro.org>2021-07-26 07:07:28 -1000
commit211364c21e7f757ae1acf4e72b5df39c498fb88b (patch)
tree00964d63f9688a29840452d41988c33f6b4fae93
parent984178d86b92be23b0efb6da769f22adb08cb83a (diff)
downloadfocaccia-qemu-211364c21e7f757ae1acf4e72b5df39c498fb88b.tar.gz
focaccia-qemu-211364c21e7f757ae1acf4e72b5df39c498fb88b.zip
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 <laurent@vivier.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r--linux-user/syscall.c3
1 files changed, 0 insertions, 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;