Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
raster3d: Prevent integer overflow by changing literal constant type
When the code is being compiled for CRAY HPC machines, a macro and a function to convert IEEE single precision floating point number to CRAY number are defined. To adjust the base, '16258' constant is being used, which according to C rules (C99, section 6.4.4.1, subsection semantics) fits into an integer. Right shifting that integer, which is of 32 bits, by 48 results in integer overflow. Avoid this by defining the literal constant with the long data type. Signed-off-by: Mohan Yelugoti <[email protected]>
- Loading branch information