This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
suppress clang warning in inode number handling
authorZefram <zefram@fysh.org>
Sat, 11 Nov 2017 23:21:48 +0000 (23:21 +0000)
committerZefram <zefram@fysh.org>
Sat, 11 Nov 2017 23:23:03 +0000 (23:23 +0000)
The gcc warning was already suppressed, but clang needs a different
formulation.

pp_sys.c

index f7e930f..7cc19de 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3010,9 +3010,11 @@ PP(pp_stat)
             */
            bool neg;
            Stat_t s;
+           CLANG_DIAG_IGNORE(-Wtautological-compare);
            GCC_DIAG_IGNORE(-Wtype-limits);
            neg = PL_statcache.st_ino < 0;
            GCC_DIAG_RESTORE;
+           CLANG_DIAG_RESTORE;
            if (neg) {
                s.st_ino = (IV)PL_statcache.st_ino;
                if (LIKELY(s.st_ino == PL_statcache.st_ino)) {