diff options
author | Karl Williamson <khw@cpan.org> | 2021-02-10 10:35:31 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-02-11 12:58:44 -0700 |
commit | 639a7c3588769b76e7a726b2c099968b81ee4214 (patch) | |
tree | 64374dbfb369f9e4f0a597d50be7a03454cb2564 /locale.c | |
parent | fcabef2537a4929bddd09a60c3aa32cd97c5dd88 (diff) | |
download | perl-639a7c3588769b76e7a726b2c099968b81ee4214.tar.gz |
locale.c: Silence compiler warning
Later gcc compilers warn on these intentional fall throughs in a
switch(). Adding FALLTHROUGH would make things a lot less clear, so
turn off the warnings around the whole switch.
Diffstat (limited to 'locale.c')
-rw-r--r-- | locale.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2915,6 +2915,9 @@ S_my_nl_langinfo(const int item, bool toggle) tm.tm_year = 2017 - 1900; tm.tm_wday = 0; tm.tm_mon = 0; + + GCC_DIAG_IGNORE_STMT(-Wimplicit-fallthrough); + switch (item) { default: Perl_croak(aTHX_ @@ -3003,6 +3006,8 @@ S_my_nl_langinfo(const int item, bool toggle) break; } + GCC_DIAG_RESTORE_STMT; + /* We can't use my_strftime() because it doesn't look at * tm_wday */ while (0 == strftime(PL_langinfo_buf, PL_langinfo_bufsize, |