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

 ID:                 64725
 Updated by:         s...@php.net
 Reported by:        s...@php.net
 Summary:            Wrong return value logic in imageaffinematrixget
 Status:             Open
 Type:               Bug
 Package:            GD related
 Operating System:   Linux
 PHP Version:        5.5Git-2013-04-26 (Git)
 Block user comment: N
 Private report:     N

 New Comment:

The build also has these warnings:

/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c: In function 
‘_gdScaleRow’:
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:981: warning: type 
defaults to ‘int’ in declaration of ‘left_channel’
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c: In function 
‘_gdScaleCol’:
/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: In function 
‘gdImageRotateGeneric’:
/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: At top level:
/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


Previous Comments:
------------------------------------------------------------------------
[2013-04-26 16:08:34] s...@php.net

Description:
------------
Compile warnings in gd.c show that that the return value logic for 
imageaffinematrixget is wrong:

/home/cjones/php-5.5/ext/gd/libgd/gd.c: In function 
‘gdImagePaletteToTrueColor’:
/home/cjones/php-5.5/ext/gd/libgd/gd.c:3014: warning: unused variable 
‘alloc_y’
/home/cjones/php-5.5/ext/gd/gd.c: In function ‘zif_imageaffinematrixget’:
/home/cjones/php-5.5/ext/gd/gd.c:5579: warning: suggest parentheses around 
assignment used as truth value

The code it points to is:

        if (res = GD_FALSE) {
                RETURN_FALSE;
        } else {




------------------------------------------------------------------------



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

Reply via email to