diff mbox series

[3/5] disas/nanomips: Use G_GNUC_PRINTF to avoid invalid string formats

Message ID 20221101114458.25756-4-philmd@linaro.org (mailing list archive)
State New, archived
Headers show
Series disas/nanomips: Format string fixes | expand

Commit Message

Philippe Mathieu-Daudé Nov. 1, 2022, 11:44 a.m. UTC
Suggested-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 disas/nanomips.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Weil Nov. 1, 2022, 12:10 p.m. UTC | #1
Am 01.11.22 um 12:44 schrieb Philippe Mathieu-Daudé:

> Suggested-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   disas/nanomips.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/disas/nanomips.c b/disas/nanomips.c
> index e4b21e7c45..3f45447292 100644
> --- a/disas/nanomips.c
> +++ b/disas/nanomips.c
> @@ -95,7 +95,7 @@ typedef struct Pool {
>   #define IMGASSERTONCE(test)
>   
>   
> -static char *img_format(const char *format, ...)
> +static char * G_GNUC_PRINTF(1, 2) img_format(const char *format, ...)
>   {
>       char *buffer;
>       va_list args;


Reviewed-by: Stefan Weil <sw@weilnetz.de>
diff mbox series

Patch

diff --git a/disas/nanomips.c b/disas/nanomips.c
index e4b21e7c45..3f45447292 100644
--- a/disas/nanomips.c
+++ b/disas/nanomips.c
@@ -95,7 +95,7 @@  typedef struct Pool {
 #define IMGASSERTONCE(test)
 
 
-static char *img_format(const char *format, ...)
+static char * G_GNUC_PRINTF(1, 2) img_format(const char *format, ...)
 {
     char *buffer;
     va_list args;