aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-10-04 14:00:15 +0200
committerMarkus Armbruster <armbru@redhat.com>2023-10-06 13:27:48 +0200
commitca84e7b2250496748ac6ed8956aad8a0fb72acde (patch)
tree331206e3c3807c3c4cf578b6aaa116a32af822c3 /util
parent5bebe03f51991ad92ae1220111eda5c7a0e70289 (diff)
downloadqemu-ca84e7b2250496748ac6ed8956aad8a0fb72acde.zip
qemu-ca84e7b2250496748ac6ed8956aad8a0fb72acde.tar.gz
qemu-ca84e7b2250496748ac6ed8956aad8a0fb72acde.tar.bz2
util/guest-random: Clean up global variable shadowing
Fix: util/guest-random.c:90:45: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] int qemu_guest_random_seed_main(const char *optarg, Error **errp) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/getopt.h:77:14: note: previous declaration is here extern char *optarg; /* getopt(3) external variables */ ^ Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20231004120019.93101-13-philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'util')
-rw-r--r--util/guest-random.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/guest-random.c b/util/guest-random.c
index 9465dda..33607d5 100644
--- a/util/guest-random.c
+++ b/util/guest-random.c
@@ -87,11 +87,11 @@ void qemu_guest_random_seed_thread_part2(uint64_t seed)
}
}
-int qemu_guest_random_seed_main(const char *optarg, Error **errp)
+int qemu_guest_random_seed_main(const char *seedstr, Error **errp)
{
uint64_t seed;
- if (parse_uint_full(optarg, 0, &seed)) {
- error_setg(errp, "Invalid seed number: %s", optarg);
+ if (parse_uint_full(seedstr, 0, &seed)) {
+ error_setg(errp, "Invalid seed number: %s", seedstr);
return -1;
} else {
deterministic = true;