diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/strftime.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/strftime.c b/lib/strftime.c index e4d78ef7011..99bee4ef978 100644 --- a/lib/strftime.c +++ b/lib/strftime.c | |||
| @@ -68,6 +68,14 @@ extern char *tzname[]; | |||
| 68 | #include <string.h> | 68 | #include <string.h> |
| 69 | #include <stdbool.h> | 69 | #include <stdbool.h> |
| 70 | 70 | ||
| 71 | #ifndef FALLTHROUGH | ||
| 72 | # if __GNUC__ < 7 | ||
| 73 | # define FALLTHROUGH ((void) 0) | ||
| 74 | # else | ||
| 75 | # define FALLTHROUGH __attribute__ ((__fallthrough__)) | ||
| 76 | # endif | ||
| 77 | #endif | ||
| 78 | |||
| 71 | #ifdef COMPILE_WIDE | 79 | #ifdef COMPILE_WIDE |
| 72 | # include <endian.h> | 80 | # include <endian.h> |
| 73 | # define CHAR_T wchar_t | 81 | # define CHAR_T wchar_t |
| @@ -1138,8 +1146,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 1138 | #ifndef _NL_CURRENT | 1146 | #ifndef _NL_CURRENT |
| 1139 | format_char = L_('p'); | 1147 | format_char = L_('p'); |
| 1140 | #endif | 1148 | #endif |
| 1141 | /* FALLTHROUGH */ | 1149 | FALLTHROUGH; |
| 1142 | |||
| 1143 | case L_('p'): | 1150 | case L_('p'): |
| 1144 | if (change_case) | 1151 | if (change_case) |
| 1145 | { | 1152 | { |
| @@ -1474,7 +1481,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 1474 | 1481 | ||
| 1475 | case L_('\0'): /* GNU extension: % at end of format. */ | 1482 | case L_('\0'): /* GNU extension: % at end of format. */ |
| 1476 | --f; | 1483 | --f; |
| 1477 | /* Fall through. */ | 1484 | FALLTHROUGH; |
| 1478 | default: | 1485 | default: |
| 1479 | /* Unknown format; output the format, including the '%', | 1486 | /* Unknown format; output the format, including the '%', |
| 1480 | since this is most likely the right thing to do if a | 1487 | since this is most likely the right thing to do if a |