On Thu, Jun 19, 2014 at 11:19:09PM -0400, Eric Sunshine wrote:
> > - if (starts_with(command_buf.buf, "M "))
> > - file_change_m(b);
> > - else if (starts_with(command_buf.buf, "D "))
> > - file_change_d(b);
> > - else if (starts_with(command_buf.buf, "R "))
> > - file_change_cr(b, 1);
> > - else if (starts_with(command_buf.buf, "C "))
> > - file_change_cr(b, 0);
> > - else if (starts_with(command_buf.buf, "N "))
> > - note_change_n(b, &prev_fanout);
> > + const char *v;
> This declaration of 'v' shadows the 'v' added by patch 8/16 earlier in
> the function.
Thanks. I reordered the patches before sending, so when this one was
originally written, there was no "v" at the top-level of the function.
I think we can just drop this interior one. The point of the short "v"
is that it can be used as a temporary value for prefix matches, so I
think we can just reuse the same one.
I tried compiling with -Wshadow (which I don't usually do), but we're
not even close to compiling clean there. Some of them are legitimately
confusing (e.g., try figuring out "end" in parse_rev_note). But others
look just annoying (e.g., complaining that a local "usage" conflicts
with the global function). I don't know if we want to put effort into
being -Wshadow clean or not.
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