On Thu, Mar 21, 2013 at 11:44:02AM -0400, Jeff King wrote:

> >     I am for dropping "= x" and leaving it uninitialized at the
> >     declaration site, or explicitly initializing it to some
> >     reasonable starting value (e.g. NULL if it is a pointer) and
> >     adding a comment to say that the initialization is to squelch
> >     compiler warnings.
> I'd be in favor of that, too. In many cases, I think the fact that gcc
> cannot trace the control flow is a good indication that it is hard for a
> human to trace it, too. And in those cases we would be better off
> restructuring the code slightly to make it more obvious to both types of
> readers.
> Two patches to follow.
>   [5/4]: fast-import: clarify "inline" logic in file_change_m
>   [6/4]: run-command: always set failed_errno in start_command

And here are two more; with these, our code base should be free of "x =
x" initializations (at least according to clang).

  [7/4]: submodule: clarify logic in show_submodule_summary
  [8/4]: match-trees: drop "x = x" initializations

Not pressing, obviously, but since I had just analyzed the code
yesterday, I wanted to do it while they were still fresh in my mind.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to