77c9f177e0
p is a generic variable in syscall() and can be used by any syscall case, so this patch removes the useless local variable declaration for the following syscalls: TARGET_NR_llistxattr, TARGET_NR_listxattr, TARGET_NR_setxattr, TARGET_NR_lsetxattr, TARGET_NR_getxattr, TARGET_NR_lgetxattr, TARGET_NR_removexattr, TARGET_NR_lremovexattr. Fix following warnings: .../linux-user/syscall.c:12342:15: warning: declaration of 'p' shadows a previous local [-Wshadow=compatible-local] 12342 | void *p, *b = 0; | ^ .../linux-user/syscall.c:8975:11: note: shadowed declaration is here 8975 | void *p; | ^ .../linux-user/syscall.c:12379:19: warning: declaration of 'p' shadows a previous local [-Wshadow=compatible-local] 12379 | void *p, *n, *v = 0; | ^ .../linux-user/syscall.c:8975:11: note: shadowed declaration is here 8975 | void *p; | ^ .../linux-user/syscall.c:12424:19: warning: declaration of 'p' shadows a previous local [-Wshadow=compatible-local] 12424 | void *p, *n, *v = 0; | ^ .../linux-user/syscall.c:8975:11: note: shadowed declaration is here 8975 | void *p; | ^ .../linux-user/syscall.c:12469:19: warning: declaration of 'p' shadows a previous local [-Wshadow=compatible-local] 12469 | void *p, *n; | ^ .../linux-user/syscall.c:8975:11: note: shadowed declaration is here 8975 | void *p; | ^ Signed-off-by: Laurent Vivier <laurent@vivier.eu> Message-ID: <20230925151029.461358-6-laurent@vivier.eu> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> |
||
---|---|---|
.. | ||
aarch64 | ||
alpha | ||
arm | ||
cris | ||
generic | ||
hexagon | ||
hppa | ||
i386 | ||
include | ||
loongarch64 | ||
m68k | ||
microblaze | ||
mips | ||
mips64 | ||
nios2 | ||
openrisc | ||
ppc | ||
riscv | ||
s390x | ||
sh4 | ||
sparc | ||
x86_64 | ||
xtensa | ||
cpu_loop-common.h | ||
elfload.c | ||
errnos.c.inc | ||
exit.c | ||
fd-trans.c | ||
fd-trans.h | ||
flat.h | ||
flatload.c | ||
ioctls.h | ||
linux_loop.h | ||
linuxload.c | ||
loader.h | ||
main.c | ||
meson.build | ||
mmap.c | ||
qemu.h | ||
semihost.c | ||
signal-common.h | ||
signal.c | ||
socket.h | ||
strace.c | ||
strace.h | ||
strace.list | ||
syscall_defs.h | ||
syscall_types.h | ||
syscall.c | ||
thunk.c | ||
trace-events | ||
trace.h | ||
uaccess.c | ||
uname.c | ||
uname.h | ||
user-internals.h | ||
user-mmap.h | ||
vm86.c |