From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: Laurent Vivier <laurent@vivier.eu>,
Markus Armbruster <armbru@redhat.com>
Subject: [PATCH 1/5] linux-user/flatload: clean up local variable shadowing
Date: Mon, 25 Sep 2023 17:10:25 +0200 [thread overview]
Message-ID: <20230925151029.461358-2-laurent@vivier.eu> (raw)
In-Reply-To: <20230925151029.461358-1-laurent@vivier.eu>
Fix following warnings:
.../linux-user/flatload.c: In function 'load_flt_binary':
.../linux-user/flatload.c:758:23: warning: declaration of 'p' shadows a previous local [-Wshadow=compatible-local]
758 | abi_ulong p;
| ^
../../../Projects/qemu/linux-user/flatload.c:722:15: note: shadowed declaration is here
722 | abi_ulong p;
| ^
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/flatload.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/linux-user/flatload.c b/linux-user/flatload.c
index 4331a11bf010..fdcc4610fa30 100644
--- a/linux-user/flatload.c
+++ b/linux-user/flatload.c
@@ -755,15 +755,15 @@ int load_flt_binary(struct linux_binprm *bprm, struct image_info *info)
/* Update data segment pointers for all libraries */
for (i=0; i<MAX_SHARED_LIBS; i++) {
if (libinfo[i].loaded) {
- abi_ulong p;
- p = libinfo[i].start_data;
+ abi_ulong seg;
+ seg = libinfo[i].start_data;
for (j=0; j<MAX_SHARED_LIBS; j++) {
- p -= 4;
+ seg -= 4;
/* FIXME - handle put_user() failures */
if (put_user_ual(libinfo[j].loaded
? libinfo[j].start_data
: UNLOADED_LIB,
- p))
+ seg))
return -EFAULT;
}
}
--
2.41.0
next prev parent reply other threads:[~2023-09-25 15:11 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 ` Laurent Vivier [this message]
2023-10-06 9:59 ` [PATCH 1/5] linux-user/flatload: " 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
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=20230925151029.461358-2-laurent@vivier.eu \
--to=laurent@vivier.eu \
--cc=armbru@redhat.com \
--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).