From: Pete Zaitcev <zaitcev@redhat.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Project Hail List <hail-devel@vger.kernel.org>
Subject: [Patch 2/3] chcli cleanup: gcc warning
Date: Tue, 2 Mar 2010 19:08:44 -0700 [thread overview]
Message-ID: <20100302190844.60b75d93@redhat.com> (raw)
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);
next reply other threads:[~2010-03-03 2:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-03 2:08 Pete Zaitcev [this message]
2010-03-03 2:18 ` [Patch 2/3] chcli cleanup: gcc warning Jeff Garzik
2010-03-03 2:41 ` Pete Zaitcev
2010-03-03 11:45 ` Jeff Garzik
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=20100302190844.60b75d93@redhat.com \
--to=zaitcev@redhat.com \
--cc=hail-devel@vger.kernel.org \
--cc=jeff@garzik.org \
/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