qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Laurent Vivier <laurent@vivier.eu>, qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>
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	[thread overview]
Message-ID: <bb283e8c-b468-932b-fc58-614d264977f9@redhat.com> (raw)
In-Reply-To: <20230925151029.461358-6-laurent@vivier.eu>

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	other threads:[~2023-10-06 11:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-25 15:10 [PATCH 0/5] linux-user: clean up local variable shadowing Laurent Vivier
2023-09-25 15:10 ` [PATCH 1/5] linux-user/flatload: " Laurent Vivier
2023-10-06  9:59   ` Thomas Huth
2023-09-25 15:10 ` [PATCH 2/5] linux-user/mmap.c: " Laurent Vivier
2023-10-06 10:01   ` Thomas Huth
2023-09-25 15:10 ` [PATCH 3/5] linux-user/syscall.c: clean up local variable shadowing in do_ioctl_dm() Laurent Vivier
2023-10-06 11:05   ` Thomas Huth
2023-09-25 15:10 ` [PATCH 4/5] linux-user/syscall.c: clean up local variable shadowing in TARGET_NR_getcpu Laurent Vivier
2023-10-06 11:07   ` Thomas Huth
2023-09-25 15:10 ` [PATCH 5/5] linux-user/syscall.c: clean up local variable shadowing in xattr syscalls Laurent Vivier
2023-10-06 11:09   ` Thomas Huth [this message]
2023-09-29  7:03 ` [PATCH 0/5] linux-user: clean up local variable shadowing Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb283e8c-b468-932b-fc58-614d264977f9@redhat.com \
    --to=thuth@redhat.com \
    --cc=armbru@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).