Add printf attribute to vprintf() functions
This allows GCC to check vprintf() format, and makes `-Wsuggest-attribute=format` happy.
This commit is contained in:
parent
cbc85b7444
commit
326c39f8d5
@ -92,6 +92,7 @@ file_puts (MIO *mio,
|
||||
return fputs (s, mio->impl.file.fp);
|
||||
}
|
||||
|
||||
G_GNUC_PRINTF (2, 0)
|
||||
static gint
|
||||
file_vprintf (MIO *mio,
|
||||
const gchar *format,
|
||||
|
@ -241,6 +241,7 @@ mem_puts (MIO *mio,
|
||||
return rv;
|
||||
}
|
||||
|
||||
G_GNUC_PRINTF (2, 0)
|
||||
static gint
|
||||
mem_vprintf (MIO *mio,
|
||||
const gchar *format,
|
||||
|
@ -145,7 +145,7 @@ struct _MIO {
|
||||
const gchar *s);
|
||||
gint (*v_vprintf) (MIO *mio,
|
||||
const gchar *format,
|
||||
va_list ap);
|
||||
va_list ap) G_GNUC_PRINTF (2, 0);
|
||||
void (*v_clearerr) (MIO *mio);
|
||||
gint (*v_eof) (MIO *mio);
|
||||
gint (*v_error) (MIO *mio);
|
||||
@ -198,7 +198,7 @@ gint mio_puts (MIO *mio,
|
||||
|
||||
gint mio_vprintf (MIO *mio,
|
||||
const gchar *format,
|
||||
va_list ap);
|
||||
va_list ap) G_GNUC_PRINTF (2, 0);
|
||||
gint mio_printf (MIO *mio,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF (2, 3);
|
||||
|
Loading…
x
Reference in New Issue
Block a user