From: Jeff King <peff@peff.net>
To: Peter Wu <peter@lekensteyn.nl>
Cc: "Torsten Bögershausen" <tboegi@web.de>,
git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH v3] remote: add --fetch and --both options to set-url
Date: Wed, 17 Dec 2014 09:28:00 -0500 [thread overview]
Message-ID: <20141217142800.GA20766@peff.net> (raw)
In-Reply-To: <5257945.aZPNBJ6Uhr@al>
On Wed, Dec 17, 2014 at 03:20:58PM +0100, Peter Wu wrote:
> > There are 2 warning "dangling else", line 1570 and 1578
> > I think we should use:
> >
> > for (i = 0; i < remote->pushurl_nr; i++) {
> > if (!regexec(&old_regex, remote->pushurl[i], 0, NULL, 0))
> > matches++;
> > else
> > negative_matches++;
> > }
> >
>
> Good catch, strange enough I did not get any warnings from my compiler
> or Clang's static analyzer. I have submitted a new patch which treats
> the accumulated comments.
Yeah, gcc does not seem to care, but compiling with clang (3.5.0 here)
does notice it.
C's parser matches what your indentation indicates, so it is just a
style fixup, not a bug (but one I agree is worth addressing).
-Peff
prev parent reply other threads:[~2014-12-17 14:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 11:48 [PATCH v3] remote: add --fetch and --both options to set-url Peter Wu
2014-11-25 22:09 ` Eric Sunshine
2014-11-25 22:53 ` Peter Wu
2014-12-04 9:37 ` Jeff King
2014-12-17 10:08 ` Torsten Bögershausen
2014-12-17 14:20 ` Peter Wu
2014-12-17 14:28 ` Jeff King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141217142800.GA20766@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peter@lekensteyn.nl \
--cc=tboegi@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).