[babl] tests: squelch clang warnings of using fabs on integer
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] tests: squelch clang warnings of using fabs on integer
- Date: Thu, 28 Nov 2019 17:14:13 +0000 (UTC)
commit f9009f8d9b29cf7d96f251bcfbdb8402298a76b5
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Nov 28 18:13:09 2019 +0100
tests: squelch clang warnings of using fabs on integer
tests/cairo_cmyk_hack.c | 2 +-
tests/srgb_to_lab_u8.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/cairo_cmyk_hack.c b/tests/cairo_cmyk_hack.c
index 3e78aa7f1..1f308fe39 100644
--- a/tests/cairo_cmyk_hack.c
+++ b/tests/cairo_cmyk_hack.c
@@ -57,7 +57,7 @@ test (void)
for (i = 0; i < PIXELS * 5; i++)
{
- if (fabs (dest_buf[i] - source_buf[i]) > TOLERANCE)
+ if (fabs (dest_buf[i] - source_buf[i] * 1.0) > TOLERANCE)
{
fprintf (stderr, "%i is wrong\n", i);
OK = 0;
diff --git a/tests/srgb_to_lab_u8.c b/tests/srgb_to_lab_u8.c
index 2b0e6ad5f..b99538f11 100644
--- a/tests/srgb_to_lab_u8.c
+++ b/tests/srgb_to_lab_u8.c
@@ -53,7 +53,7 @@ test (void)
for (i = 0; i < PIXELS * 3; i++)
{
- if (fabs (destination_buf[i] - reference_buf[i]) > TOLERANCE)
+ if (fabs (1.0 * destination_buf[i] - reference_buf[i]) > TOLERANCE)
{
fprintf (stderr, "%2i (%2i%%3=%i, %2i/3=%i) is %i should be %i",
i, i, i % 3, i, i / 3, destination_buf[i], reference_buf[i]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]