[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: avoid gcc 4.6.2 'may be used before set' warnings in dfa.c
From: |
Paul Eggert |
Subject: |
Re: avoid gcc 4.6.2 'may be used before set' warnings in dfa.c |
Date: |
Wed, 15 Feb 2012 15:57:09 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111229 Thunderbird/9.0 |
On 02/15/2012 10:54 AM, Aharon Robbins wrote:
> - int c, c1, c2;
> + int c = 0, c1 = 0, c2 = 0;
Sorry, I don't see why this patch (and the other) is needed.
grep's copy of src/dfa.h says this:
extern void dfaerror (const char *) __attribute__ ((noreturn));
and all paths to the first use of c or wc lead
through either an initialization of them, or a call
to dfaerror.
Also, all def-use paths for c1, c2, wc1, and wc2
seem sound, at least in grep's copy of dfa.c, so why
do they need to be initialized?