public inbox for hail-devel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch 2/3] chcli cleanup: gcc warning
@ 2010-03-03  2:08 Pete Zaitcev
  2010-03-03  2:18 ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Pete Zaitcev @ 2010-03-03  2:08 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Project Hail List

The variable "stat" produces the following warning:

chcli.c:441: warning: declaration of ‘stat’ shadows a global declaration

Just rename it to fix.

Signed-Off-By: Pete Zaitcev <zaitcev@redhat.com>

---
 tools/chcli.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/chcli.c b/tools/chcli.c
index 1c3576d..7f3858e 100644
--- a/tools/chcli.c
+++ b/tools/chcli.c
@@ -438,7 +438,7 @@ static bool stc_put_file(struct st_client *stc, const void *key, size_t key_len,
 {
 	bool rcb;
 	int fd;
-	struct stat stat;
+	struct stat statb;
 	off64_t content_len;
 	int rc;
 
@@ -446,12 +446,12 @@ static bool stc_put_file(struct st_client *stc, const void *key, size_t key_len,
 	if (fd < 0)
 		return false;
 
-	rc = fstat(fd, &stat);
+	rc = fstat(fd, &statb);
 	if (rc) {
 		close(fd);
 		return false;
 	}
-	content_len = stat.st_size;
+	content_len = statb.st_size;
 	rcb = stc_put(stc, key, key_len, read_file_cb, content_len, &fd, flags);
 	close(fd);
 

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

end of thread, other threads:[~2010-03-03 11:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-03  2:08 [Patch 2/3] chcli cleanup: gcc warning Pete Zaitcev
2010-03-03  2:18 ` Jeff Garzik
2010-03-03  2:41   ` Pete Zaitcev
2010-03-03 11:45     ` Jeff Garzik

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