Bug #64710 [ReO->Csd]: Implicit function declaration and unused variables in gd.c
Edit report at https://bugs.php.net/bug.php?id=64710&edit=1
ID: 64710
Updated by: sixd@php.net
Reported by: sixd@php.net
Summary: Implicit function declaration and unused variables
in gd.c
-Status: Re-Opened
+Status: Closed
Type: Bug
Package: GD related
Operating System: Ubuntu 12.04
PHP Version: 5.5.0beta4
Assigned To: pajoye
Block user comment: N
Private report: N
New Comment:
gd.c currently compiles without warnings in PHP 5.5
Previous Comments:
------------------------------------------------------------------------
[2013-05-01 21:36:53] sixd@php.net
Re-opening as per IRC discussion with Pierre.
The following warnings are still outstanding in PHP 5.5 from git:
/home/cjones/php-5.5/ext/gd/libgd/gd.c:3014: warning: unused variable âalloc_yâ
and:
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:1023: warning: unused variable ârowâ
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:1766: warning: unused variable
âf_127â
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:359: warning: âfilter_cubic_splineâ
defined but not used
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:375: warning:
âfilter_cubic_convolutionâ defined but not used
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:410: warning: âfilter_filterâ defined
but not used
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:420: warning: âfilter_lanczos8â
defined but not used
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:436: warning: âfilter_lanczos3â
defined but not used
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:508: warning: âfilter_cosineâ defined
but not used
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:546: warning:
âfilter_quadratic_bsplineâ defined but not used
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:595: warning: âfilter_welshâ defined
but not used
------------------------------------------------------------------------
[2013-04-26 06:16:27] pajoye@php.net
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2013-04-25 18:35:59] sixd@php.net
There are similar issues in some of the libgd functions:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gdhelpers.c: In function
âphp_gd_gd_strtok_râ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gdhelpers.c:18:9: warning:
variable âstartâ set but not used [-Wunused-but-set-variable]
and
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_gif_in.c: In function
âphp_gd_gdImageCreateFromGifCtxâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_gif_in.c:139:18: warning:
variable âgif87aâ set but not used [-Wunused-but-set-variable]
and
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_gif_out.c: In function
âphp_gd_gdImageGifCtxâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_gif_out.c:120:6: warning:
variable âinterlaceâ set but not used [-Wunused-but-set-variable]
and
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_arc.c: In function
âphp_gd_gdImageFilledEllipseâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_arc.c:61:6: warning:
variable âold_y1â set but not used [-Wunused-but-set-variable]
and
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_rotate.c: In function
âphp_gd_gdImageRotate45â:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_rotate.c:351:10: warning:
variable âfâ set but not used [-Wunused-but-set-variable]
and
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_crop.c: In function
âgdImageCropAutoâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_crop.c:109:13: warning:
variable âcornersâ set but not used [-Wunused-but-set-variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_crop.c: In function
âgdColorMatchâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_crop.c:340:2: warning:
suggest parentheses around arithmetic in operand of â^â [-Wparentheses]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_crop.c:340:2: warning:
suggest parentheses around arithmetic in operand of â^â [-Wparentheses]
and
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c: In function
â_gdScaleRowâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c:981:10:
warning: type defaults to âintâ in declaration of âleft_channelâ [-Wimplicit-
int]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c: In function
â_gdScaleColâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c:1023:8:
warning: unused variable ârowâ [-Wunused-variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c: In function
âgdImageScaleBilinearTCâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c:1306:6:
warning: variable âdwSrcTotalOffsetâ set but not used [-Wunused-but-set-
variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c: In function
âgdImageRotateGenericâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c:1766:13:
warning: unused variable âf_127â [-Wunused-variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c: In function
âgdTransformAffineCopyâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c:2343:23:
warning: variable âinterpolation_bakâ set but not used [-Wunused-but-set-
variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c: At top
level:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c:358:15:
warning: âfilter_cubic_splineâ defined but not used [-Wunused-function]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c:374:15:
warning: âfilter_cubic_convolutionâ defined but not used [-Wunused-function]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c:409:15:
warning: âfilter_filterâ defined but not used [-Wunused-function]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c:419:15:
warning: âfilter_lanczos8â defined but not used [-Wunused-function]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c:435:15:
warning: âfilter_lanczos3â defined but not used [-Wunused-function]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c:507:15:
warning: âfilter_cosineâ defined but not used [-Wunused-function]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c:545:15:
warning: âfilter_quadratic_bsplineâ defined but not used [-Wunused-function]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd_interpolation.c:594:15:
warning: âfilter_welshâ defined but not used [-Wunused-function]
------------------------------------------------------------------------
[2013-04-25 18:08:18] sixd@php.net
Description:
------------
Compiling gd.c gives these warnings:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/gd.c: In function
âzif_imageloadfontâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/gd.c:1656:2: warning: implicit
declaration of function âoverflow2â [-Wimplicit-function-declaration]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd.c: In function
âphp_gd__gdImageFillTiledâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd.c:1961:6: warning: variable
âtiledâ set but not used [-Wunused-but-set-variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd.c: In function
âphp_gd_gdImageRectangleâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd.c:2038:6: warning: variable
âhalf1â set but not used [-Wunused-but-set-variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/gd.c: In function âzif_imagecropâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/gd.c:5263:9: warning: unused variable
âthresholdâ [-Wunused-variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/gd.c:5262:7: warning: unused variable
âcolorâ [-Wunused-variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/gd.c:5261:7: warning: unused variable
âmodeâ [-Wunused-variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/gd.c: In function âzif_imagescaleâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd.c: In function
âphp_gd_gdImageCopyResizedâ:/home/cjones/Desktop/php-
5.5.0beta4/ext/gd/gd.c:5369:9: warning: unused variable âthresholdâ [-Wunused-
variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd.c:2359:9: warning: variable
âaccumâ set but not used [-Wunused-but-set-variable]/home/cjones/Desktop/php-
5.5.0beta4/ext/gd/gd.c:5368:7: warning: unused variable âcolorâ [-Wunused-
variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/gd.c:5367:7: warning: unused variable
âmodeâ [-Wunused-variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/gd.c: In function âzif_imageaffineâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/gd.c:5420:9: warning: unused variable
âthresholdâ [-Wunused-variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/gd.c:5419:7: warning: unused variable
âcolorâ [-Wunused-variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/gd.c:5418:7: warning: unused variable
âmodeâ [-Wunused-variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/gd.c: In function
âzif_imageaffinematrixgetâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/gd.c:5526:6: warning: variable âresâ
set but not used [-Wunused-but-set-variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd.c: In function
âgdImagePaletteToTrueColorâ:
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd.c:3020:29: warning: unused
variable âalloc_aaâ [-Wunused-variable]
/home/cjones/Desktop/php-5.5.0beta4/ext/gd/libgd/gd.c:3020:16: warning: unused
variable âalloc_yâ [-Wunused-variable]
My 'configure' options were:
'--with-gd' \
'--with-curl' \
'--with-jpeg-dir' \
'--with-png-dir' \
'--enable-gd-native-ttf' \
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64710&edit=1
Thread (5 messages)