Theo Buehler wrote:
> Theo mentioned on icb yesterday that when compiling ksh for instbin, a
> warning similar to this one is emitted:
> 
> /usr/src/bin/ksh/edit.c: In function 'x_print_expansions':
> /usr/src/bin/ksh/edit.c:303: warning: 'l.beg' may be used uninitialized in 
> this function
> 
> This warning is only seen when using -Os.
> 
> The code is a bit difficult to follow due to the XP* macros in expand.h.
> The reason of the complaint is that XPptrv(l) expands to l.beg.  Note
> that this is only used if use_copy == 1, which in turn is only true if l
> was initialized, so I think the warning is bogus.
> 
> The following avoids the warning by being a bit less clever.
> 
> The various completions, where x_print_expansions() is used,  still seem
> to work fine, both with vi and emacs editing mode.

I won't say this is clear, but it seems less tricky, so ok.

Reply via email to