[Propose Patch] Fixing #457 Air temp and water temp not saved

Linus Torvalds torvalds at linux-foundation.org
Thu Mar 20 11:39:54 PDT 2014


On Thu, Mar 20, 2014 at 11:30 AM, Long Wu <wulong at comp.nus.edu.sg> wrote:
> The following patch solved the problem described at #457 by removing
> select_dc().
>
> So here is the question, is select_dc means select dive computer? If so,
> that means the temperatures are coming from external device, so these two
> temperature fields should not allowed to modify.
>
> If that is user input, then this patch should be correct, please help verify
> this.:)

Ack, this sounds like the right fix. We should *not* modify the
temperatures the DC reports.

In fact, we should generally never modify divecomputer data at all, so
maybe we could try to mark the dive computer data "const" and see
where that causes compiler warnings?

                Linus


More information about the subsurface mailing list