This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Initialize a couple variables in fixincl.c


James Morrison wrote:
> 
>  Hi,
> 
>   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;
    }
  else

I think I didn't do it 'cuz of the ugly cast.
Maybe a separate statement + curly braces and such....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]