Skip to content

Commit 8b7b9c5

Browse files
philmdMarkus Armbruster
authored andcommitted
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é <[email protected]> Message-ID: <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Markus Armbruster <[email protected]>
1 parent fcd9a35 commit 8b7b9c5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

trace/control.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,10 @@ bool trace_init_backends(void)
285285
return true;
286286
}
287287

288-
void trace_opt_parse(const char *optarg)
288+
void trace_opt_parse(const char *optstr)
289289
{
290290
QemuOpts *opts = qemu_opts_parse_noisily(qemu_find_opts("trace"),
291-
optarg, true);
291+
optstr, true);
292292
if (!opts) {
293293
exit(1);
294294
}

trace/control.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ extern QemuOptsList qemu_trace_opts;
197197

198198
/**
199199
* trace_opt_parse:
200-
* @optarg: A string argument of --trace command line argument
200+
* @optstr: A string argument of --trace command line argument
201201
*
202202
* Initialize tracing subsystem.
203203
*/
204-
void trace_opt_parse(const char *optarg);
204+
void trace_opt_parse(const char *optstr);
205205

206206
/**
207207
* trace_get_vcpu_event_count:

0 commit comments

Comments
 (0)