diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-12-24 00:56:59 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-12-24 00:56:59 +0100 |
commit | f0fbff4c905fd3e21d7aefedd45d98cc9dd54018 (patch) | |
tree | c61f47f858a9ac6183676bd7aee378a6a2b84a19 /src/corelib/global/qglobal.h | |
parent | d776937df91e46536f404c6868d64016b6038d7b (diff) | |
parent | 0e1ce36ae67de940b2d499ec7f23e520dce0f112 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I2defae1904154283446b069d151c3ef57302ec7b
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 18e9ecae85..f5f144fe6b 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -467,6 +467,19 @@ typedef qptrdiff qintptr; # define QT_FASTCALL #endif +// enable gcc warnings for printf-style functions +#if defined(Q_CC_GNU) && !defined(__INSURE__) +# if defined(Q_CC_MINGW) && !defined(Q_CC_CLANG) +# define Q_ATTRIBUTE_FORMAT_PRINTF(A, B) \ + __attribute__((format(gnu_printf, (A), (B)))) +# else +# define Q_ATTRIBUTE_FORMAT_PRINTF(A, B) \ + __attribute__((format(printf, (A), (B)))) +# endif +#else +# define Q_ATTRIBUTE_FORMAT_PRINTF(A, B) +#endif + //defines the type for the WNDPROC on windows //the alignment needs to be forced for sse2 to not crash with mingw #if defined(Q_OS_WIN) |