This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Initialize a couple variables in fixincl.c
- From: Bruce Korb <bkorb at veritas dot com>
- To: James Morrison <ja2morri at csclub dot uwaterloo dot ca>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 24 Jan 2004 16:29:51 -0800
- Subject: Re: [patch] Initialize a couple variables in fixincl.c
- Organization: Home
- References: <20040124170842.DCDED10C6EB@perpugilliam.csclub.uwaterloo.ca>
James Morrison wrote:
> I noticed that fixincl.c had a couple warnings for unitialized variables.
> This patch fixes those.
> Tested with make check in the fixinc directory. Ok?
No. Instead, set the "res" to "SKIP_FIX" in the default case
(which never happens). As for the "pz_cmd_save", it is a weakness
in the usage analysis, though I also can't imagine teaching the
compiler to figure it out. Maybe just NULL it out a few lines
later where pz_cmd is NULL-ed:
if ((p_fixd->fd_flags & FD_SHELL_SCRIPT) == 0)
pz_cmd_save = NULL;
pz_cmd = NULL;
I think I didn't do it 'cuz of the ugly cast.
Maybe a separate statement + curly braces and such....