]> git.proxmox.com Git - mirror_qemu.git/commitdiff
trace/control: Clean up global variable shadowing
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 4 Oct 2023 12:00:19 +0000 (14:00 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 6 Oct 2023 11:27:48 +0000 (13:27 +0200)
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>
trace/control.c
trace/control.h

index 1a48a7e266dc1b0d2db9ce30d59de3699c8c2e58..ef107829ac00ebfb90c01b2677a27aae33c7e841 100644 (file)
@@ -285,10 +285,10 @@ bool trace_init_backends(void)
     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"),
-                                             optarg, true);
+                                             optstr, true);
     if (!opts) {
         exit(1);
     }
index dfd209edd839db1a38fdd5d86562164b6cad3f3a..6754bfe052b8a7eb2f93ebc4f7cc556990ac0d51 100644 (file)
@@ -197,11 +197,11 @@ extern QemuOptsList qemu_trace_opts;
 
 /**
  * trace_opt_parse:
- * @optarg: A string argument of --trace command line argument
+ * @optstr: A string argument of --trace command line argument
  *
  * Initialize tracing subsystem.
  */
-void trace_opt_parse(const char *optarg);
+void trace_opt_parse(const char *optstr);
 
 /**
  * trace_get_vcpu_event_count: