[Vxl-users] VNL warnings: Implicit conversion from 64 to 32 bits.

 [Vxl-users] VNL warnings: Implicit conversion from 64 to 32 bits. From: Mathieu Coursolle - 2007-08-21 14:51:50 ```Hi VXL users, I am using ITK, which is using VNL library. However, when I build my application with XCode (OSX), I get a warning about implicit conversion from 64 to 32 bits. The warning is produced from those lines: vnl=5Fmath.h inline int vnl=5Fmath=5Frnd(float x) { return lroundf(x); } inline int vnl=5Fmath=5Frnd(double x) { return lround(x); } lroundf and lround return a long value, but the vnl=5Fmath=5Frnd function = returns an int. However, a long might not be the same size as an int, which causes an implicit conversion here. A simple way to solve this without changing the API would be to cast the return value: inline int vnl=5Fmath=5Frnd(float x) { return = static=5Fcast(lroundf(x)); } inline int vnl=5Fmath=5Frnd(double x) { return = static=5Fcast(lround(x)); } Would it be possible to have that change in the next release=3F Thanks. Mathieu -- =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Mathieu Coursolle mcoursolle@... Rogue Research http://www.rogue-research.com Montr=E9al, Qu=E9bec, Canada ```

 [Vxl-users] VNL warnings: Implicit conversion from 64 to 32 bits. From: Mathieu Coursolle - 2007-08-21 14:51:50 ```Hi VXL users, I am using ITK, which is using VNL library. However, when I build my application with XCode (OSX), I get a warning about implicit conversion from 64 to 32 bits. The warning is produced from those lines: vnl=5Fmath.h inline int vnl=5Fmath=5Frnd(float x) { return lroundf(x); } inline int vnl=5Fmath=5Frnd(double x) { return lround(x); } lroundf and lround return a long value, but the vnl=5Fmath=5Frnd function = returns an int. However, a long might not be the same size as an int, which causes an implicit conversion here. A simple way to solve this without changing the API would be to cast the return value: inline int vnl=5Fmath=5Frnd(float x) { return = static=5Fcast(lroundf(x)); } inline int vnl=5Fmath=5Frnd(double x) { return = static=5Fcast(lround(x)); } Would it be possible to have that change in the next release=3F Thanks. Mathieu -- =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Mathieu Coursolle mcoursolle@... Rogue Research http://www.rogue-research.com Montr=E9al, Qu=E9bec, Canada ```