diff options
author | Stefan Weil <weil@mail.berlios.de> | 2010-09-23 21:28:03 +0200 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-10-03 06:34:36 +0000 |
commit | e5924d8980e0bd027f2f12fa702ec1c555538230 (patch) | |
tree | 74d22ef9b1e233ae742b9e5873da6202c9ea3b30 /qerror.h | |
parent | 4a2b39d3232fea40d3e396a683f27f5e378ae46e (diff) |
Replace most gcc format attributes by macro GCC_FMT_ATTR (format checking)
Since version 4.4.x, gcc supports additional format attributes.
__attribute__ ((format (gnu_printf, 1, 2)))
should be used instead of
__attribute__ ((format (printf, 1, 2))
because QEMU always uses standard format strings (even with mingw32).
The patch replaces format attribute printf / __printf__ by macro
GCC_FMT_ATTR which uses gnu_printf if supported.
It also removes an #ifdef __GNUC__ (not needed any longer).
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'qerror.h')
-rw-r--r-- | qerror.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -38,8 +38,7 @@ QError *qerror_from_info(const char *file, int linenr, const char *func, QString *qerror_human(const QError *qerror); void qerror_print(QError *qerror); void qerror_report_internal(const char *file, int linenr, const char *func, - const char *fmt, ...) - __attribute__ ((format(printf, 4, 5))); + const char *fmt, ...) GCC_FMT_ATTR(4, 5); #define qerror_report(fmt, ...) \ qerror_report_internal(__FILE__, __LINE__, __func__, fmt, ## __VA_ARGS__) QError *qobject_to_qerror(const QObject *obj); |