Skip to content

Commit 7294559

Browse files
committed
Fix [-Wimplicit-fallthrough] warnings in Date extension
TODO: Fix TimeLib or suppress warning in extension flags
1 parent d781f86 commit 7294559

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/date/php_date.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -713,8 +713,8 @@ static zend_string *date_format(const char *format, size_t format_len, timelib_t
713713
length = slprintf(buffer, sizeof(buffer), "%s", "Z");
714714
break;
715715
}
716-
/* break intentionally missing */
717-
case 'P': rfc_colon = 1; /* break intentionally missing */
716+
fallthrough;
717+
case 'P': rfc_colon = 1; fallthrough;
718718
case 'O': length = slprintf(buffer, sizeof(buffer), "%c%02d%s%02d",
719719
localtime ? ((offset->offset < 0) ? '-' : '+') : '+',
720720
localtime ? abs(offset->offset / 3600) : 0,
@@ -765,7 +765,7 @@ static zend_string *date_format(const char *format, size_t format_len, timelib_t
765765
break;
766766
case 'U': length = slprintf(buffer, sizeof(buffer), "%lld", (timelib_sll) t->sse); break;
767767

768-
case '\\': if (i < format_len) i++; /* break intentionally missing */
768+
case '\\': if (i < format_len) i++; fallthrough;
769769

770770
default: buffer[0] = format[i]; buffer[1] = '\0'; length = 1; break;
771771
}

0 commit comments

Comments
 (0)