Skip to content

Commit baeba4b

Browse files
committed
Merge branch 'PHP-8.1'
* PHP-8.1: add missing conditions fix [-Wstrict-prototypes] build warnings in ext/gd
2 parents 1241ec8 + 54f1f8c commit baeba4b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/gd/gd.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4260,21 +4260,27 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
42604260
}
42614261

42624262
switch (image_type) {
4263+
#ifdef HAVE_GD_JPG
42634264
case PHP_GDIMG_TYPE_JPG:
42644265
gdImageJpegCtx(im, ctx, (int) quality);
42654266
break;
4267+
#endif
4268+
#ifdef HAVE_GD_WEBP
42664269
case PHP_GDIMG_TYPE_WEBP:
42674270
if (quality == -1) {
42684271
quality = 80;
42694272
}
42704273
gdImageWebpCtx(im, ctx, (int) quality);
42714274
break;
4275+
#endif
4276+
#ifdef HAVE_GD_AVIF
42724277
case PHP_GDIMG_TYPE_AVIF:
42734278
if (speed == -1) {
42744279
speed = 6;
42754280
}
42764281
gdImageAvifCtx(im, ctx, (int) quality, (int) speed);
42774282
break;
4283+
#endif
42784284
#ifdef HAVE_GD_PNG
42794285
case PHP_GDIMG_TYPE_PNG:
42804286
#ifdef HAVE_GD_BUNDLED

0 commit comments

Comments
 (0)