[gimp] plug-ins: fix a type warning.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: fix a type warning.
- Date: Sat, 24 Oct 2020 08:57:13 +0000 (UTC)
commit 7462945360323e54163f68519ab75e2927d2414e
Author: Jehan <jehan girinstud io>
Date: Sat Oct 24 02:58:38 2020 +0200
plug-ins: fix a type warning.
Since obj->type_data is also int anyway, multiplying by a double value
is unneeded anyway. So let's just make an integer multiplication.
Fixes the following warning:
> warning: using integer absolute value function ‘abs’ when argument is
> of floating point type ‘double’ [-Wabsolute-value]
plug-ins/gfig/gfig-spiral.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plug-ins/gfig/gfig-spiral.c b/plug-ins/gfig/gfig-spiral.c
index f35e87b121..e8a5d66bcb 100644
--- a/plug-ins/gfig/gfig-spiral.c
+++ b/plug-ins/gfig/gfig-spiral.c
@@ -201,7 +201,7 @@ d_paint_spiral (GfigObject *obj)
ang_grid = 2.0 * G_PI / 180.0;
/* count - */
- seg_count = abs (obj->type_data * 180.0) + clock_wise * (gint)RINT (offset_angle/ang_grid);
+ seg_count = abs (obj->type_data * 180) + clock_wise * (gint)RINT (offset_angle/ang_grid);
line_pnts = g_new0 (gdouble, 2 * seg_count + 3);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]