<div dir="ltr">Hey guys,<div><br></div><div>Thanks for the help on this topic!</div><div><br></div><div>I have now updated my pull request with the different proposed changes.</div><div>The first commit changes all rint to lrint. Based on Lubomir recommendation, I went through the different places to check (and use) lrintf where necessary. Doing so I found two places that looked strange to me since (to my understanding) it was using rint on the result of an integer division, this seemed curious! This is why I changed the code to use double/float division. Please have a closer look there:</div><div><br></div>In dive.h the gas_mnd function:<br>rint(mbar_to_depth(maxambient, dive) / roundto) * roundto; <br><br><div>In parse-xml.c the divinglog_profile function:<br>rint(atoi(cns) / 10) </div><div><br></div><div>Second commit, fixes all warnings raised by "-Wfloat-conversion", I made the change from round to lrint in uemis code too.</div><div><br></div><div>Unfortunately I could not enable the flag in that commit since travis seems to be using gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 that do not include this option... Nevertheless it may be a good idea to make use of the option so should we:</div><div>1. Upgrade travis build to use more recent version of gcc and add the flag unconditionally?</div><div>2. Add the flag under a cmake gcc version condition so that people using more recent version of gcc in their dev env be warned about the mistakes?</div><div>3. Since 1 could be annoying to people still using older gcc in their dev env, we could upgrade travis but still put the flag behind a condition like proposed in 2?</div><div><br></div><div>With this change, TestParse will now pass on Windows too, we now only have TestPreference failing! Getting there :)</div><div><br></div><div>Best regards,</div><div><br></div><div>Jérémie</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-08 9:21 GMT+07:00 Jérémie Guichard <span dir="ltr"><<a href="mailto:djeBrest@gmail.com" target="_blank">djeBrest@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I'm looking into that right now :)</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-03-08 7:18 GMT+07:00 Dirk Hohndel <span dir="ltr"><<a href="mailto:dirk@hohndel.org" target="_blank">dirk@hohndel.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Tue, Mar 07, 2017 at 09:43:06AM -0800, Linus Torvalds wrote:<br>
> On Tue, Mar 7, 2017 at 9:20 AM, Lubomir I. Ivanov <<a href="mailto:neolit123@gmail.com" target="_blank">neolit123@gmail.com</a>> wrote:<br>
> ><br>
> > lrint() seems to build for me with mingw 4.9.2.<br>
><br>
> .. in fact, I notice that we had a couple of places in the GPS<br>
> coordinates code that already used 'lrint()', so it must work.<br>
><br>
> The uemis code has a few places that use 'round()' instead of rint() -<br>
> those should probably be converted to 'lrint()' as well.<br>
<br>
</span>Would you be willing to run the script, make the other changes you<br>
suggest, and send a patch / pull request?<br>
<br>
I'm really swamped this week.<br>
<span class="m_6126811945329896698HOEnZb"><font color="#888888"><br>
/D<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>