--- src/testlib/qtest_global.h +++ src/testlib/qtest_global.h @@ -59,7 +59,11 @@ namespace QTest enum SkipMode { SkipSingle = 1, SkipAll = 2 }; enum TestFailMode { Abort = 1, Continue = 2 }; - int Q_TESTLIB_EXPORT qt_snprintf(char *str, int size, const char *format, ...); + int Q_TESTLIB_EXPORT qt_snprintf(char *str, int size, const char *format, ...) +#if defined(Q_CC_GNU) && !defined(__INSURE__) + __attribute__ ((format (printf, 3, 4))) +#endif + ; } QT_END_HEADER