mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-30 04:44:16 +02:00
The following patch corrects some function attributes. (#61780)
The following patch corrects some function attributes. (#61780) * glib/ghash.h (g_int_equal, g_int_hash): These are not const. * glib/glibintl.h (_glib_gettext): Add G_GNUC_FORMAT(1). * glib/gmacros.h: Use reserved symbols in function attribute macros. The following patch avoids manual printf()-format parsing if a C99-conforming vsnprintf() is available. (#55106) * acinclude.m4 (AC_FUNC_VSNPRINTF_C99): New macro to test for a C99 conforming vsnprintf. * configure.in: Use AC_FUNC_VSNPRINTF_C99. * glib/gmessages.c (g_printf_string_upper_bound): Use C99 vsnprintf().
This commit is contained in:
@@ -56,19 +56,19 @@
|
||||
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
|
||||
#define G_GNUC_PRINTF( format_idx, arg_idx ) \
|
||||
__attribute__((format (printf, format_idx, arg_idx)))
|
||||
__attribute__((__format__ (__printf__, format_idx, arg_idx)))
|
||||
#define G_GNUC_SCANF( format_idx, arg_idx ) \
|
||||
__attribute__((format (scanf, format_idx, arg_idx)))
|
||||
__attribute__((__format__ (__scanf__, format_idx, arg_idx)))
|
||||
#define G_GNUC_FORMAT( arg_idx ) \
|
||||
__attribute__((format_arg (arg_idx)))
|
||||
__attribute__((__format_arg__ (arg_idx)))
|
||||
#define G_GNUC_NORETURN \
|
||||
__attribute__((noreturn))
|
||||
__attribute__((__noreturn__))
|
||||
#define G_GNUC_CONST \
|
||||
__attribute__((const))
|
||||
__attribute__((__const__))
|
||||
#define G_GNUC_UNUSED \
|
||||
__attribute__((unused))
|
||||
__attribute__((__unused__))
|
||||
#define G_GNUC_NO_INSTRUMENT \
|
||||
__attribute__((no_instrument_function))
|
||||
__attribute__((__no_instrument_function__))
|
||||
#else /* !__GNUC__ */
|
||||
#define G_GNUC_PRINTF( format_idx, arg_idx )
|
||||
#define G_GNUC_SCANF( format_idx, arg_idx )
|
||||
|
Reference in New Issue
Block a user