Git development
 help / color / mirror / Atom feed
* [PATCH] sha1_file.c: fix a declaration-after-statement
@ 2015-08-06  9:53 Ramsay Jones
  2015-08-06 10:08 ` Ramsay Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Ramsay Jones @ 2015-08-06  9:53 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GIT Mailing-list


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!

[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;
 
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-06 10:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-06  9:53 [PATCH] sha1_file.c: fix a declaration-after-statement Ramsay Jones
2015-08-06 10:08 ` Ramsay Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox