summary refs log tree commit diff stats
path: root/ui/vnc-palette.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2023-09-21 14:13:08 +0200
committerMarkus Armbruster <armbru@redhat.com>2023-09-29 08:13:57 +0200
commite33e66b1b3655d98aadebf7e22eae18077698401 (patch)
tree61d3d8c69b473d0b1504d2b7a3454453279200db /ui/vnc-palette.c
parent7f3de3f02f0bd0eaa3ba4506f9a60c1c35865e93 (diff)
downloadfocaccia-qemu-e33e66b1b3655d98aadebf7e22eae18077698401.tar.gz
focaccia-qemu-e33e66b1b3655d98aadebf7e22eae18077698401.zip
ui: Clean up local variable shadowing
Local variables shadowing other local variables or parameters make the
code needlessly hard to understand.  Tracked down with -Wshadow=local.
Clean up: delete inner declarations when they are actually redundant,
else rename variables.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20230921121312.1301864-4-armbru@redhat.com>
Diffstat (limited to 'ui/vnc-palette.c')
-rw-r--r--ui/vnc-palette.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/ui/vnc-palette.c b/ui/vnc-palette.c
index dc7c0ba997..4e88c412f0 100644
--- a/ui/vnc-palette.c
+++ b/ui/vnc-palette.c
@@ -86,8 +86,6 @@ int palette_put(VncPalette *palette, uint32_t color)
         return 0;
     }
     if (!entry) {
-        VncPaletteEntry *entry;
-
         entry = &palette->pool[palette->size];
         entry->color = color;
         entry->idx = idx;