diff --git a/gl/lib/fadvise.c b/gl/lib/fadvise.c index 3456ce187..562f1eb6a 100644 --- a/gl/lib/fadvise.c +++ b/gl/lib/fadvise.c @@ -14,6 +14,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +/* Without this pragma, gcc suggests that (given !HAVE_POSIX_FADVISE) + the the fdadvise function might be candidate for attribute 'const'. */ +#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ +# pragma GCC diagnostic ignored "-Wsuggest-attribute=const" +#endif + #include #include "fadvise.h"