mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 13:48:02 +02:00
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'
^~~~~~~~~~
This commit is contained in:
parent
3e12dfda3c
commit
1528c96da6
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue