Jim Meyering <jim <at> meyering.net> writes:

>     getndelim2.c: In function 'getndelim2':
>     getndelim2.c:103: error: 'c' may be used uninitialized in this function

You are correct that this warning is spurious - the use of c in question is 
guarded by a NULL buffer, and c was guaranteed to be set earlier when buffer is 
NULL.

> Subject: [PATCH] avoid a warning from gcc
> 
> * lib/getndelim2.c (IF_LINT): Define.
> (getndelim2): Use it to void a "may be used uninitialized" warning.

Looks good to me.  Go ahead and commit.

-- 
Eric Blake




Reply via email to