sim: fix printf format warning about non-string literal
This is the normal "passing a buffer straight to printf makes GCC warn". While we know this particular case is fine, the trend in this source tree is to fix this anyways to avoid the warnings.
This commit is contained in:
parent
ff398ee4f3
commit
d946c2884d
@ -1,3 +1,8 @@
|
|||||||
|
2010-03-30 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
|
* sim-utils.c (sim_io_eprintf_cpu): Use %s with printf string.
|
||||||
|
* sim-hw.c (hw_option_handler): Likewise.
|
||||||
|
|
||||||
2010-03-30 Mike Frysinger <vapier@gentoo.org>
|
2010-03-30 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* sim-watch.c (watchpoint_type_to_str): Add const to return.
|
* sim-watch.c (watchpoint_type_to_str): Add const to return.
|
||||||
|
@ -257,7 +257,7 @@ hw_option_handler (struct sim_state *sd, sim_cpu *cpu, int opt,
|
|||||||
|
|
||||||
case OPTION_HW_DEVICE:
|
case OPTION_HW_DEVICE:
|
||||||
{
|
{
|
||||||
hw_tree_parse (STATE_HW (sd)->tree, arg);
|
hw_tree_parse (STATE_HW (sd)->tree, "%s", arg);
|
||||||
return SIM_RC_OK;
|
return SIM_RC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ sim_io_eprintf_cpu (sim_cpu *cpu, const char *fmt, ...)
|
|||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start (ap, fmt);
|
va_start (ap, fmt);
|
||||||
sim_io_eprintf (sd, sim_cpu_msg_prefix (cpu));
|
sim_io_eprintf (sd, "%s", sim_cpu_msg_prefix (cpu));
|
||||||
sim_io_evprintf (sd, fmt, ap);
|
sim_io_evprintf (sd, fmt, ap);
|
||||||
va_end (ap);
|
va_end (ap);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user