Uninitialized variable in profile.c
rickmwalsh at gmail.com
Sun Dec 17 15:10:14 PST 2017
On 18 Dec. 2017 12:20 am, "Berthold Stoeger" <bstoeger at mail.tuwien.ac.at>
In current master, gcc produces an uninitialized variable warning in
which seems correct to me.
In l.1044 last_ceiling is compared to first_ceiling, but last_ceilng is set
first in l.1056. I guess decoMode() cannot change in this function, so gcc's
analysis seems correct.
There is another warning concerning entry in l.807. To make the warning go
away, you could add a
if (pi->nr <= 0)
block before the loop. Even if pi->nr can never be <= 0, this seems like a
good idea for robustness' sake.
Timezone differences mean I missed this discussion. My experience in
programming is limited and entirely informal. So long as the result is as
expected, I will happily defer to the judgement of you, Dirk and Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the subsurface