[PATCH 0/9] fix some warnings

Lubomir I. Ivanov neolit123 at gmail.com
Mon Oct 27 13:03:33 PDT 2014


thanks for pushing the patches,

On 27 October 2014 16:41, Dirk Hohndel <dirk at hohndel.org> wrote:
>> >> [PATCH 5/9] divelogexportdialog.cpp: attempt to fix a 'unsigned /
>
> The original code clearly has issues, but so does your patch. Something is
> fishy if the offset can be negative but we compare it against a time
> that's unsigned. I need to stare at the code and look at the values a bit
> longer - or maybe you could do that (as I won't have time until late
> tonight, I think).
>
> Everything else I will push in a moment once my test builds finish.
>

this is Robert's code (CC) so perhaps he or others have some ideas.
on a brief look, DiveLogExportDialog::export_depths() would not always
produce a correct depth value (depth.mm).

given the times will not be that large for a realistic dive,
s->time.seconds *should* be auto-converted to int32_t by the compiler,
but also the pictures with negative offsets will be ignored as sample
times are always positive.

i don't exactly understand what the function does, but i think the
comparison should consider the "dive->when", which is what both
samples and pictures are based upon?.

lubomir
--


More information about the subsurface mailing list