This is the mail archive of the
mailing list for the Cygwin project.
Re: [PATCH] Fix potentially uninitialized variable p
- From: Ray Donnelly <mingw dot android at gmail dot com>
- To: cygwin-patches at cygwin dot com
- Date: Wed, 8 Jan 2014 11:00:14 +0000
- Subject: Re: [PATCH] Fix potentially uninitialized variable p
- Authentication-results: sourceware.org; auth=none
- References: <CAOYw7dvP64FFXUJS60ixUqj2jr01Dzf3YrchyR79m7AQEb8TKA at mail dot gmail dot com> <20131222071118 dot GB2110 at ednor dot casa dot cgf dot cx>
On Sun, Dec 22, 2013 at 7:11 AM, Christopher Faylor wrote:
> On Sun, Dec 22, 2013 at 12:40:20AM +0000, Ray Donnelly wrote:
>>- PWCHAR p;
>>+ PWCHAR p = NULL;
> AFAICT, that would result in a NULL dereference. I've checked in
> a different change to handle this.
A NULL dereference is maybe more consistent than the random
dereference that would have otherwise happened.
I was only trying to ensure -Werror builds succeed.