aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorLaurent Vivier <laurent@vivier.eu>2023-09-25 17:10:25 +0200
committerMarkus Armbruster <armbru@redhat.com>2023-10-06 13:27:48 +0200
commitd5308ea64c1a4608f98b80e83a126515045d0fac (patch)
tree28357583d60880f7037005ff4e705e05e238008b /linux-user
parente7121b15411d0a9220d82d293537b91841f47c82 (diff)
downloadqemu-d5308ea64c1a4608f98b80e83a126515045d0fac.zip
qemu-d5308ea64c1a4608f98b80e83a126515045d0fac.tar.gz
qemu-d5308ea64c1a4608f98b80e83a126515045d0fac.tar.bz2
linux-user/flatload: clean up local variable shadowing
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> Message-ID: <20230925151029.461358-2-laurent@vivier.eu> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/flatload.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/linux-user/flatload.c b/linux-user/flatload.c
index 4331a11..fdcc461 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;
}
}