diff options
author | George Peter Banyard <girgias@php.net> | 2020-02-06 01:20:46 +0100 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2020-02-06 01:34:09 +0100 |
commit | ac89139773a456f70f460fcc5fefb90c6326b257 (patch) | |
tree | b0e51ff1b2024de669b3c888852ed3f483d86a92 | |
parent | 62c51fc4a7482b6d4e2507d89b0d8d475240af1f (diff) | |
download | php-git-ac89139773a456f70f460fcc5fefb90c6326b257.tar.gz |
Fix [-Wtype-limits] in bundled GD lib by using signed integers
As seen in the gdImageRotateBicubicFixed() function the same setup
occurs but it uses signed integers, therefore we use also use
signed integers in gdImageRotateBilinear()
Moreover, these two functions have been removed upstream in
https://github.com/libgd/libgd/commit/bd6d2e101f6f1df106d1cd2e2dc8058a5538109b
therefore we should also mimic upstream and remove them...
Thanks to @cmb69 for pointing it out.
-rw-r--r-- | ext/gd/libgd/gd_interpolation.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c index 1a7cf209dc..651c92467a 100644 --- a/ext/gd/libgd/gd_interpolation.c +++ b/ext/gd/libgd/gd_interpolation.c @@ -1771,8 +1771,8 @@ gdImagePtr gdImageRotateBilinear(gdImagePtr src, const float degrees, const int const gdFixed f_j = gd_itofx((int)j - (int)new_width/2); const gdFixed f_m = gd_mulfx(f_j,f_sin) + gd_mulfx(f_i,f_cos) + f_0_5 + f_H; const gdFixed f_n = gd_mulfx(f_j,f_cos) - gd_mulfx(f_i,f_sin) + f_0_5 + f_W; - const unsigned int m = gd_fxtoi(f_m); - const unsigned int n = gd_fxtoi(f_n); + const int m = gd_fxtoi(f_m); + const int n = gd_fxtoi(f_n); if ((m >= 0) && (m < src_h - 1) && (n >= 0) && (n < src_w - 1)) { const gdFixed f_f = f_m - gd_itofx(m); |