summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2024-02-17 20:36:53 +1030
committerAdrian Johnson <ajohnson@redneon.com>2024-04-17 08:00:23 +0930
commit1528c96da6af99a992406877bab62ef8c4043843 (patch)
treeb98f73b9fe6d8e23f5fee8d5737cfb94aa0e559a /util
parent3e12dfda3c55a310ad6f0d67b91cf8df8890fd61 (diff)
Fix implicit conversion warning
GCC 12.2 reports the following warning: [3/16] Compiling C object util/cairo-script/libcairo-script-interpreter.so.2.11801.1.p/cairo-script-scanner.c.o ../util/cairo-script/cairo-script-scanner.c:1562:38: warning: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Wimplicit-const-int-float-conversion] if (real >= INT32_MIN && real <= INT32_MAX && (int) real == real) ~~ ^~~~~~~~~ /usr/include/stdint.h:123:22: note: expanded from macro 'INT32_MAX' ^~~~~~~~~~
Diffstat (limited to 'util')
-rw-r--r--util/cairo-script/cairo-script-scanner.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/cairo-script/cairo-script-scanner.c b/util/cairo-script/cairo-script-scanner.c
index fe6512dd9..a69ae5f5a 100644
--- a/util/cairo-script/cairo-script-scanner.c
+++ b/util/cairo-script/cairo-script-scanner.c
@@ -1559,7 +1559,7 @@ _translate_real (csi_t *ctx,
{
uint8_t hdr;
- if (real >= INT32_MIN && real <= INT32_MAX && (int) real == real)
+ if ((double)real >= INT32_MIN && (double)real <= INT32_MAX && (int) real == real)
return _translate_integer (ctx, real, closure);
#if WORDS_BIGENDIAN