git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael Wookey <michaelwookey@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] MSVC: fix build warnings
Date: Fri, 02 Oct 2009 15:05:04 -0700	[thread overview]
Message-ID: <7v7hvd4flb.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <d2e97e800910021440q46bd46c4y8a5af987620ffc5c@mail.gmail.com> (Michael Wookey's message of "Sat\, 3 Oct 2009 07\:40\:08 +1000")

Michael Wookey <michaelwookey@gmail.com> writes:

> diff --git a/builtin-branch.c b/builtin-branch.c
> index 9f57992..cf6a9ca 100644
> --- a/builtin-branch.c
> +++ b/builtin-branch.c
> @@ -93,7 +93,7 @@ static const char *branch_get_color(enum color_branch ix)
>
>  static int delete_branches(int argc, const char **argv, int force, int kinds)
>  {
> -	struct commit *rev, *head_rev = head_rev;

I haven't tried, but the patch may break build with "gcc -Werror".

This is a common and unfortunate idiom to tell the readers of the code
that this initialization is unnecessary, gcc is not clever enough to
notice and gives warnings, and we are squelching it, knowing what we are
doing.

  reply	other threads:[~2009-10-02 22:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-02 21:40 [PATCH] MSVC: fix build warnings Michael Wookey
2009-10-02 22:05 ` Junio C Hamano [this message]
2009-10-02 23:28   ` Michael Wookey
2009-10-05  2:41     ` Junio C Hamano
2009-10-05  5:38       ` Michael Wookey
2009-10-05  6:31         ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v7hvd4flb.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=michaelwookey@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).