[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compilation warning in error.c
From: |
Werner LEMBERG |
Subject: |
Re: compilation warning in error.c |
Date: |
Thu, 06 Nov 2014 07:30:54 +0100 (CET) |
> 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