diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-10-04 14:00:12 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2023-10-06 13:27:48 +0200 |
commit | afb81fe8542c0962b025c566476cdded3b8ec5e1 (patch) | |
tree | feaf327f1237bb30a883e02387a8f918d33255a2 /semihosting | |
parent | e0c7de8dc4a3c0b7a0d0fa21fa0561a4dc763716 (diff) | |
download | qemu-afb81fe8542c0962b025c566476cdded3b8ec5e1.zip qemu-afb81fe8542c0962b025c566476cdded3b8ec5e1.tar.gz qemu-afb81fe8542c0962b025c566476cdded3b8ec5e1.tar.bz2 |
semihosting: Clean up global variable shadowing
Fix:
semihosting/config.c:134:49: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
int qemu_semihosting_config_options(const char *optarg)
^
/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-10-philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'semihosting')
-rw-r--r-- | semihosting/config.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/semihosting/config.c b/semihosting/config.c index 8ca5697..e826457 100644 --- a/semihosting/config.c +++ b/semihosting/config.c @@ -131,10 +131,10 @@ void qemu_semihosting_enable(void) semihosting.target = SEMIHOSTING_TARGET_AUTO; } -int qemu_semihosting_config_options(const char *optarg) +int qemu_semihosting_config_options(const char *optstr) { QemuOptsList *opt_list = qemu_find_opts("semihosting-config"); - QemuOpts *opts = qemu_opts_parse_noisily(opt_list, optarg, false); + QemuOpts *opts = qemu_opts_parse_noisily(opt_list, optstr, false); semihosting.enabled = true; @@ -155,7 +155,7 @@ int qemu_semihosting_config_options(const char *optarg) semihosting.target = SEMIHOSTING_TARGET_AUTO; } else { error_report("unsupported semihosting-config %s", - optarg); + optstr); return 1; } } else { @@ -165,7 +165,7 @@ int qemu_semihosting_config_options(const char *optarg) qemu_opt_foreach(opts, add_semihosting_arg, &semihosting, NULL); } else { - error_report("unsupported semihosting-config %s", optarg); + error_report("unsupported semihosting-config %s", optstr); return 1; } |