Skip to content

Commit

Permalink
r3.in.v5d: Fix -Wliteral-range warning (#2748)
Browse files Browse the repository at this point in the history
Addresses a -Wliteral-range compiler warning, with the message:
"floating-point comparison is always false; constant cannot
be represented exactly in type 'float' "
  • Loading branch information
nilason committed Jan 16, 2023
1 parent a946ca6 commit cbac597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion raster3d/r3.in.v5d/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void convert(char *openFile, RASTER3D_Region *region, int convertNull,
for (y = 0; y < region->rows; y++) {
for (x = 0; x < region->cols; x++) {
value = data1[cnt++];
if (convertNull && (value == MISSING))
if (convertNull && IS_MISSING(value))
Rast3d_set_null_value(&value, 1, FCELL_TYPE);
Rast3d_put_float(map, x, y, z, value);
}
Expand Down

0 comments on commit cbac597

Please sign in to comment.