mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-18 16:53:50 +08:00
sim: ppc: fix printf warnings
This code hits some format-zero-length warnings, so hack the code like we did in the common layers.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2021-06-29 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
|
* main.c (sim_io_error): Add comment
|
||||||
|
* sim_calls.c (sim_io_error): Likewise. Change "" to " ".
|
||||||
|
(error): Likewise.
|
||||||
|
|
||||||
2021-06-20 Mike Frysinger <vapier@gentoo.org>
|
2021-06-20 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* Makefile.in (INLINE_CFLAGS): Change to $(SIM_INLINE).
|
* Makefile.in (INLINE_CFLAGS): Change to $(SIM_INLINE).
|
||||||
|
@ -214,6 +214,8 @@ sim_io_flush_stdoutput(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Glue to use sim-fpu module. */
|
||||||
|
|
||||||
void
|
void
|
||||||
sim_io_error (SIM_DESC sd, const char *msg, ...)
|
sim_io_error (SIM_DESC sd, const char *msg, ...)
|
||||||
{
|
{
|
||||||
|
@ -372,6 +372,8 @@ sim_io_flush_stdoutput(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Glue to use sim-fpu module. */
|
||||||
|
|
||||||
void
|
void
|
||||||
sim_io_error (SIM_DESC sd, const char *fmt, ...)
|
sim_io_error (SIM_DESC sd, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
@ -379,7 +381,9 @@ sim_io_error (SIM_DESC sd, const char *fmt, ...)
|
|||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
callbacks->evprintf_filtered (callbacks, fmt, ap);
|
callbacks->evprintf_filtered (callbacks, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
callbacks->error (callbacks, "");
|
/* Printing a space here avoids empty printf compiler warnings. Not ideal,
|
||||||
|
but we want error's side-effect where it halts processing. */
|
||||||
|
callbacks->error (callbacks, " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
/****/
|
/****/
|
||||||
@ -391,7 +395,9 @@ error (const char *msg, ...)
|
|||||||
va_start(ap, msg);
|
va_start(ap, msg);
|
||||||
callbacks->evprintf_filtered (callbacks, msg, ap);
|
callbacks->evprintf_filtered (callbacks, msg, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
callbacks->error (callbacks, "");
|
/* Printing a space here avoids empty printf compiler warnings. Not ideal,
|
||||||
|
but we want error's side-effect where it halts processing. */
|
||||||
|
callbacks->error (callbacks, " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
|
Reference in New Issue
Block a user