Skip to content

mesa: when INT_MAX and INT_MIN get converted into float, precision lowers

David Heidelberg requested to merge dh/mesa:2023-05-02-correct-conversion into main

Be explicit about the conversion values.

Fixes clang warning:

../src/mesa/main/get.c:86:31: warning: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Wimplicit-const-int-float-conversion]

Not 100% sure it's the right solution, but seems it could work. Anyway, this should be fixed this way or another, as the code doesn't represent the right math.

Merge request reports

Loading