Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Used-uninitalized error I hadn't seen before



Bart wrote:
> Just built zsh 5.6 on a new host.

What compiler is this and what options? I don't get the warning with any
compiler I've got. It'd be useful to track down which uses of the
variable cause the warning.

> computil.c: In function 'ca_inactive':
> computil.c:1832: warning: 'grplen' may be used uninitialized in this function
>
> It's not immediately clear to me to what grplen should be initialized.

I'm fairly sure that it is wrong and grplen can't be used uninitialized.
The trouble with adding an initialisation to silence the warning is that
it wouldn't be a meaningful value. That can make the code harder to follow
later because someone reading the code might puzzle over that initial
value.

Oliver



Messages sorted by: Reverse Date, Date, Thread, Author