trace/control: Clean up global variable shadowing

Fix:

  trace/control.c:288:34: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
  void trace_opt_parse(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-17-philmd@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2023-10-04 14:00:19 +02:00 committed by Markus Armbruster
parent fcd9a35379
commit 8b7b9c5c88
2 changed files with 4 additions and 4 deletions

View File

@ -285,10 +285,10 @@ bool trace_init_backends(void)
return true; return true;
} }
void trace_opt_parse(const char *optarg) void trace_opt_parse(const char *optstr)
{ {
QemuOpts *opts = qemu_opts_parse_noisily(qemu_find_opts("trace"), QemuOpts *opts = qemu_opts_parse_noisily(qemu_find_opts("trace"),
optarg, true); optstr, true);
if (!opts) { if (!opts) {
exit(1); exit(1);
} }

View File

@ -197,11 +197,11 @@ extern QemuOptsList qemu_trace_opts;
/** /**
* trace_opt_parse: * trace_opt_parse:
* @optarg: A string argument of --trace command line argument * @optstr: A string argument of --trace command line argument
* *
* Initialize tracing subsystem. * Initialize tracing subsystem.
*/ */
void trace_opt_parse(const char *optarg); void trace_opt_parse(const char *optstr);
/** /**
* trace_get_vcpu_event_count: * trace_get_vcpu_event_count: