On 7 March 2017 at 19:11, Linus Torvalds <torva...@linux-foundation.org> wrote: > On Mon, Mar 6, 2017 at 8:50 PM, Linus Torvalds > <torva...@linux-foundation.org> wrote: >> >> Ugh, yes. Mainly because it warns even about the "cast rint() to an >> integer" case: > > Actually, the correct thing to do is to use lrint(), but my very dim > memory is that this didn't work on Windows. > > Dirk (or anybody else with a Windows build), does this build: > > git grep -l '\<rint(' | xargs sed -i 's/rint(/lrint(/g' > > it just replaces 'rint()" calls with 'lrint()'. > > If it does build, you should just commit it. Otherwise we'd need some > Windows helper macro to implement it, possibly just > > #ifdef WIN32 > #define lrint(x) ((long)rint(x)) > #endif > > or similar. > > That gets rid of the worst noise, and leaves just real (but admittedly > likely not very important) float->integer conversion warnings. >
lrint() seems to build for me with mingw 4.9.2. if it works for Dirk's Windows build, then its good to go. lubomir -- _______________________________________________ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface