> I suggest disabling the unwanted diagnostic instead. Something like > this at the start of the file: > > #if 4 < __GNUC__ + (3 <= __GNUC_MINOR__) > # pragma GCC diagnostic ignored "-Wformat-extra-args" > #endif
This is better, thanks. However, I'm not happy to globally disable the warning. Isn't it possible to use GCC function attributes to suppress the warning locally, exactly at the right spot – or rather telling GCC that there is nothing to warn about? Alternatively, I suggest using the `push' and `pop' functionality of #pragma. Werner