Skip to content

Commit 8ab0aef

Browse files
committed
Fix [-Wimplicit-fallthrough] warnings in EXIF extension
1 parent 4c72f33 commit 8ab0aef

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ext/exif/exif.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2216,11 +2216,14 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
22162216
* return;
22172217
*/
22182218
info_data->tag = TAG_FMT_UNDEFINED;/* otherwise not freed from memory */
2219+
fallthrough;
22192220
case TAG_FMT_SBYTE:
22202221
case TAG_FMT_BYTE:
22212222
/* in contrast to strings bytes do not need to allocate buffer for NULL if length==0 */
2222-
if (!length)
2223+
if (!length) {
22232224
break;
2225+
}
2226+
fallthrough;
22242227
case TAG_FMT_UNDEFINED:
22252228
if (length > value_len) {
22262229
exif_error_docref("exif_iif_add_value" EXIFERR_CC, image_info, E_WARNING, "length > value_len: %d > %zu", length, value_len);
@@ -2520,6 +2523,7 @@ static void add_assoc_image_info(zval *value, int sub_array, image_info_type *im
25202523
}
25212524
break;
25222525
}
2526+
fallthrough;
25232527
case TAG_FMT_USHORT:
25242528
case TAG_FMT_ULONG:
25252529
if (l==1) {
@@ -2546,6 +2550,7 @@ static void add_assoc_image_info(zval *value, int sub_array, image_info_type *im
25462550
}
25472551
break;
25482552
}
2553+
fallthrough;
25492554
case TAG_FMT_SSHORT:
25502555
case TAG_FMT_SLONG:
25512556
if (l==1) {

0 commit comments

Comments
 (0)