From: Nikita Popov Date: Tue, 11 Jun 2019 14:50:25 +0000 (+0200) Subject: Fix abs(long) warnings in gd.c X-Git-Tag: php-7.4.0alpha1~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0849a621fd2b965edce74c10a916e46b9b328a6d;p=php Fix abs(long) warnings in gd.c I'm fixing this using (int) casts instead of labs() because this is what upstream GD does. --- diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 2013e8ef42..4492a9d381 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -1256,7 +1256,7 @@ void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col) if (dx == 0 && dy == 0) { return; } - if (abs(dx) > abs(dy)) { + if (abs((int)dx) > abs((int)dy)) { if (dx < 0) { tmp = x1; x1 = x2;