[gimp] plug-ins: fix abs() on long int.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: fix abs() on long int.
- Date: Mon, 13 Apr 2020 21:19:40 +0000 (UTC)
commit fddaa77218d29c676496341ac8472ae03233085e
Author: Jehan <jehan girinstud io>
Date: Mon Apr 13 23:18:19 2020 +0200
plug-ins: fix abs() on long int.
Fixes the following bug:
> warning: absolute value function ‘abs’ given an argument of type
> ‘glong’ {aka ‘long int’} but has parameter of type ‘int’ which may
> cause truncation of value [-Wabsolute-value]
plug-ins/common/sample-colorize.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plug-ins/common/sample-colorize.c b/plug-ins/common/sample-colorize.c
index 9ce3643095..b044fb5d97 100644
--- a/plug-ins/common/sample-colorize.c
+++ b/plug-ins/common/sample-colorize.c
@@ -1955,7 +1955,7 @@ color_error (guchar ref_red, guchar ref_green, guchar ref_blue,
cmp_h = (3 * cmp_red + 6 * cmp_green + cmp_blue) / 10;
ref_h = (3 * ref_red + 6 * ref_green + ref_blue) / 10;
- fs = abs (ref_h - cmp_h);
+ fs = labs (ref_h - cmp_h);
ff = fs * fs;
/* 2. add Red Color differences */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]