qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 5/5] linux-user/syscall.c: clean up local variable shadowing


From: Thomas Huth
Subject: Re: [PATCH 5/5] linux-user/syscall.c: clean up local variable shadowing in xattr syscalls
Date: Fri, 6 Oct 2023 13:09:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1

On 25/09/2023 17.10, Laurent Vivier wrote:
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>
---
  linux-user/syscall.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]