From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Junio C Hamano <gitster@pobox.com>
Cc: GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH] sha1_file.c: fix a declaration-after-statement
Date: Thu, 06 Aug 2015 11:08:31 +0100 [thread overview]
Message-ID: <55C3321F.5080801@ramsay1.demon.co.uk> (raw)
In-Reply-To: <55C32EA5.2010302@ramsay1.demon.co.uk>
On 06/08/15 10:53, Ramsay Jones wrote:
>
> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
> ---
>
> Hi Junio,
>
> Sorry for this hit-n-run patch, but I'm in a hurry ... :-D
> Could you please squash this (or something like it) into
> the relevant patch; Thanks!
Ah, I've just read your 'What's Cooking' email and I see that
you are already aware of this.
Sorry for the noise!
ATB,
Ramsay Jones
>
> [I noticed this simply because I have '-Wdeclaration-after-statement'
> and '-Werror' (among others) set in CFLAGS (via config.mak).]
>
> HTH
>
> ATB,
> Ramsay Jones
>
> sha1_file.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/sha1_file.c b/sha1_file.c
> index 43386a8..a0af574 100644
> --- a/sha1_file.c
> +++ b/sha1_file.c
> @@ -1462,8 +1462,9 @@ int git_open_noatime(const char *name)
> static int sha1_file_open_flag = O_NOATIME;
>
> for (;;) {
> + int fd;
> errno = 0;
> - int fd = open(name, O_RDONLY | sha1_file_open_flag);
> + fd = open(name, O_RDONLY | sha1_file_open_flag);
> if (fd >= 0)
> return fd;
>
>
prev parent reply other threads:[~2015-08-06 10:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 9:53 [PATCH] sha1_file.c: fix a declaration-after-statement Ramsay Jones
2015-08-06 10:08 ` Ramsay Jones [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=55C3321F.5080801@ramsay1.demon.co.uk \
--to=ramsay@ramsay1.demon.co.uk \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox