From eac6ae822ccb8b1e5404add1f1f5d094dd4c0446 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sat, 12 Oct 2013 07:49:36 +0200 Subject: [PATCH] * include/grub/misc.h: Use gnu_printf rather than printf as format template since our functions are independent of libc. --- ChangeLog | 5 +++++ include/grub/misc.h | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 087d256c9..9de840737 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-12 Vladimir Serbinenko + + * include/grub/misc.h: Use gnu_printf rather than printf as format + template since our functions are independent of libc. + 2013-10-11 Vladimir Serbinenko * util/grub-setup.c (setup): Move copying of partition table as diff --git a/include/grub/misc.h b/include/grub/misc.h index 9d7f2121d..01abc69a4 100644 --- a/include/grub/misc.h +++ b/include/grub/misc.h @@ -328,8 +328,8 @@ char *EXPORT_FUNC(grub_strdup) (const char *s) __attribute__ ((warn_unused_resul char *EXPORT_FUNC(grub_strndup) (const char *s, grub_size_t n) __attribute__ ((warn_unused_result)); void *EXPORT_FUNC(grub_memset) (void *s, int c, grub_size_t n); grub_size_t EXPORT_FUNC(grub_strlen) (const char *s) __attribute__ ((warn_unused_result)); -int EXPORT_FUNC(grub_printf) (const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); -int EXPORT_FUNC(grub_printf_) (const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); +int EXPORT_FUNC(grub_printf) (const char *fmt, ...) __attribute__ ((format (gnu_printf, 1, 2))); +int EXPORT_FUNC(grub_printf_) (const char *fmt, ...) __attribute__ ((format (gnu_printf, 1, 2))); /* Replace all `ch' characters of `input' with `with' and copy the result into `output'; return EOS address of `output'. */ @@ -367,14 +367,14 @@ int EXPORT_FUNC(grub_puts_) (const char *s); void EXPORT_FUNC(grub_real_dprintf) (const char *file, const int line, const char *condition, - const char *fmt, ...) __attribute__ ((format (printf, 4, 5))); + const char *fmt, ...) __attribute__ ((format (gnu_printf, 4, 5))); int EXPORT_FUNC(grub_vprintf) (const char *fmt, va_list args); int EXPORT_FUNC(grub_snprintf) (char *str, grub_size_t n, const char *fmt, ...) - __attribute__ ((format (printf, 3, 4))); + __attribute__ ((format (gnu_printf, 3, 4))); int EXPORT_FUNC(grub_vsnprintf) (char *str, grub_size_t n, const char *fmt, va_list args); char *EXPORT_FUNC(grub_xasprintf) (const char *fmt, ...) - __attribute__ ((format (printf, 1, 2))) __attribute__ ((warn_unused_result)); + __attribute__ ((format (gnu_printf, 1, 2))) __attribute__ ((warn_unused_result)); char *EXPORT_FUNC(grub_xvasprintf) (const char *fmt, va_list args) __attribute__ ((warn_unused_result)); void EXPORT_FUNC(grub_exit) (void) __attribute__ ((noreturn)); void EXPORT_FUNC(grub_abort) (void) __attribute__ ((noreturn)); @@ -472,7 +472,7 @@ extern struct grub_boot_time *EXPORT_VAR(grub_boot_time_head); void EXPORT_FUNC(grub_real_boot_time) (const char *file, const int line, - const char *fmt, ...) __attribute__ ((format (printf, 3, 4))); + const char *fmt, ...) __attribute__ ((format (gnu_printf, 3, 4))); #define grub_boot_time(fmt, args...) grub_real_boot_time(GRUB_FILE, __LINE__, fmt, ## args) #else #define grub_boot_time(fmt, args...)