Clang 18 implicit conversion warnings
nxrighthere opened this issue · comments
For your awareness, Clang 18 throws the following warnings:
binn/binn.c:3343:54: warning: implicit conversion from 'int' to 'float' changes value from
2147483647 to 2147483648 [-Wimplicit-const-int-float-conversion]
3343 | if (value->vfloat < INT32_MIN || value->vfloat > INT32_MAX) return FALSE;
| ~ ^~~~~~~~~
E:/MinGW/include/stdint.h:83:19: note: expanded from macro 'INT32_MAX'
83 | #define INT32_MAX 2147483647
| ^~~~~~~~~~
binn/binn.c:3380:54: warning: implicit conversion from 'long long' to 'float' changes value from
9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
3380 | if (value->vfloat < INT64_MIN || value->vfloat > INT64_MAX) return FALSE;
| ~ ^~~~~~~~~
E:/MinGW/include/stdint.h:84:19: note: expanded from macro 'INT64_MAX'
84 | #define INT64_MAX 9223372036854775807LL
| ^~~~~~~~~~~~~~~~~~~~~
Source/binn/binn.c:3384:56: warning: implicit conversion from 'long long' to 'double' changes value
from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
3384 | if (value->vdouble < INT64_MIN || value->vdouble > INT64_MAX) return FALSE;
| ~ ^~~~~~~~~
E:/MinGW/include/stdint.h:84:19: note: expanded from macro 'INT64_MAX'
84 | #define INT64_MAX 9223372036854775807LL
| ^~~~~~~~~~~~~~~~~~~~~
Fixed. Thanks!