Mesa (main): xa: fix compile warning for -Wabsolute-value
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jan 3 20:44:39 UTC 2022
Module: Mesa
Branch: main
Commit: 574c4466f8e836c1dd6963351f880633f4c1a133
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=574c4466f8e836c1dd6963351f880633f4c1a133
Author: Thomas H.P. Andersen <phomes at gmail.com>
Date: Sat Dec 25 18:24:05 2021 +0100
xa: fix compile warning for -Wabsolute-value
fixes a compile warning with clang
Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14302>
---
src/gallium/frontends/xa/xa_renderer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/frontends/xa/xa_renderer.c b/src/gallium/frontends/xa/xa_renderer.c
index 6aa661322e3..3426ffa98d7 100644
--- a/src/gallium/frontends/xa/xa_renderer.c
+++ b/src/gallium/frontends/xa/xa_renderer.c
@@ -35,7 +35,7 @@
#include "util/u_draw_quad.h"
#define floatsEqual(x, y) (fabsf(x - y) <= 0.00001f * MIN2(fabsf(x), fabsf(y)))
-#define floatIsZero(x) (floatsEqual((x) + 1, 1))
+#define floatIsZero(x) (floatsEqual((x) + 1.0f, 1.0f))
#define NUM_COMPONENTS 4
@@ -49,7 +49,7 @@ static inline boolean
is_affine(const float *matrix)
{
return floatIsZero(matrix[2]) && floatIsZero(matrix[5])
- && floatsEqual(matrix[8], 1);
+ && floatsEqual(matrix[8], 1.0f);
}
static inline void
More information about the mesa-commit
mailing list