From 71a72d2faebe54078c04ad04a5fd3440f94ee20f Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Tue, 20 Mar 2018 12:25:26 +0100 Subject: [PATCH] GS_Generate(): remove Warning diff is int, abs is "int abs(int);" current->data.pal.h is byte but ds->gradients[id].hue is float. So cast to int before the substraction --- src/op_c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/op_c.c b/src/op_c.c index 9f01c941..376aed37 100644 --- a/src/op_c.c +++ b/src/op_c.c @@ -1092,7 +1092,7 @@ void GS_Generate(T_Gradient_set * ds,T_Cluster_set * cs) best_diff=99999999; for (id=0;idnb;id++) { - diff=abs(current->data.pal.h - ds->gradients[id].hue); + diff=abs(current->data.pal.h - (int)ds->gradients[id].hue); if ((best_diff>diff) && (diff<16)) { best_gradient=id;