37 int38__wt_floatcmp(float f1, float f2) 39 { 40 #define WT_FLOAT_PRECISION 1000 CID 121074 (#1 of 1): Result is not floating-point (UNINTENDED_INTEGER_DIVISION)integer_division: Dividing integer expressions 1 and 1000, and then converting the integer quotient to type float. Any remainder, or fractional part of the quotient, is ignored. To compute and use a non-integer quotient, change or cast either operand to type float. If integer division is intended, consider indicating that by casting the result to type int 41 if (fabsf(f1 - f2) < 1 / WT_FLOAT_PRECISION) 42 return (0);
That is "1 / 1000" is integer zero, not a floating point number.
- causes
-
WT-8410 Conversion from floats to integers changed overhead computation formula in block cache
- Closed