[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] getndelim2.c: avoid a warning from gcc
From: |
Eric Blake |
Subject: |
Re: [PATCH] getndelim2.c: avoid a warning from gcc |
Date: |
Wed, 30 Apr 2008 15:52:14 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
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