Edit report at https://bugs.php.net/bug.php?id=64710&edit=1

 ID:                 64710
 Updated by:         s...@php.net
 Reported by:        s...@php.net
 Summary:            Implicit function declaration and unused variables
                     in gd.c
 Status:             Open
 Type:               Bug
 Package:            GD related
 Operating System:   Ubuntu 12.04
 PHP Version:        5.5.0beta4
 Block user comment: N
 Private report:     N

 New Comment:

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]


Previous Comments:
------------------------------------------------------------------------
[2013-04-25 18:08:18] s...@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

Reply via email to