]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - time/strftime_l.c
Fix strftime build with GCC 8.
[thirdparty/glibc.git] / time / strftime_l.c
index 439b971747a75d2add00e0f0a5fe0f1052c9408a..b5ba9ca93793e48cc5372924d3bd53ab318b4efe 100644 (file)
@@ -715,12 +715,22 @@ __strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format,
       format_char = *f;
       switch (format_char)
        {
-#define DO_NUMBER(d, v) \
-         digits = d > width ? d : width;                                     \
-         number_value = v; goto do_number
-#define DO_NUMBER_SPACEPAD(d, v) \
-         digits = d > width ? d : width;                                     \
-         number_value = v; goto do_number_spacepad
+#define DO_NUMBER(d, v)                                \
+         do                                    \
+           {                                   \
+             digits = d > width ? d : width;   \
+             number_value = v;                 \
+             goto do_number;                   \
+           }                                   \
+         while (0)
+#define DO_NUMBER_SPACEPAD(d, v)               \
+         do                                    \
+           {                                   \
+             digits = d > width ? d : width;   \
+             number_value = v;                 \
+             goto do_number_spacepad;          \
+           }                                   \
+         while (0)
 
        case L_('%'):
          if (modifier != 0)