[PATCH] Be much more careful about merging dives
Linus Torvalds
torvalds at linux-foundation.org
Tue Sep 22 19:45:24 PDT 2015
On Tue, Sep 22, 2015 at 7:35 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> This gives me a warning when I compile it:
>
> Declaring dc as
>
> const struct divecomputer *dc;
>
> fixes that. Any issues with that?
Gaah. I knew about it, and was going to fix it, but then forgot about
it. I even made that "dc_totaltime()" take a "const" pointer argument
exactly because of that thing, but I just forgot that variable
declaration.
So yes, making the divecomputer pointer 'const' is the right thing. Sorry.
Linus
More information about the subsurface
mailing list