Revision 9c9e7d51

b/audio/audio_int.h
236 236
    return (dst >= src) ? (dst - src) : (len - src + dst);
237 237
}
238 238

  
239
#if defined __GNUC__
240
#define GCC_ATTR __attribute__ ((__unused__, __format__ (__printf__, 1, 2)))
241
#define GCC_FMT_ATTR(n, m) __attribute__ ((__format__ (__printf__, n, m)))
242
#else
243
#define GCC_ATTR /**/
244
#define GCC_FMT_ATTR(n, m)
245
#endif
246

  
247 239
static void GCC_ATTR dolog (const char *fmt, ...)
248 240
{
249 241
    va_list ap;
b/qemu-common.h
70 70
#include <sys/uio.h>
71 71
#endif
72 72

  
73
#if defined __GNUC__
74
# if (__GNUC__ < 4) || \
75
     defined(__GNUC_MINOR__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 4)
76
   /* gcc versions before 4.4.x don't support gnu_printf, so use printf. */
77
#  define GCC_ATTR __attribute__((__unused__, format(printf, 1, 2)))
78
#  define GCC_FMT_ATTR(n, m) __attribute__((format(printf, n, m)))
79
# else
80
   /* Use gnu_printf when supported (qemu uses standard format strings). */
81
#  define GCC_ATTR __attribute__((__unused__, format(gnu_printf, 1, 2)))
82
#  define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
83
# endif
84
#else
85
#define GCC_ATTR /**/
86
#define GCC_FMT_ATTR(n, m)
87
#endif
88

  
73 89
#ifdef _WIN32
74 90
#define fsync _commit
75 91
#define lseek _lseeki64

Also available in: Unified diff