From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pete Zaitcev Subject: [Patch 2/3] chcli cleanup: gcc warning Date: Tue, 2 Mar 2010 19:08:44 -0700 Message-ID: <20100302190844.60b75d93@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="utf-8" To: Jeff Garzik Cc: Project Hail List The variable "stat" produces the following warning: chcli.c:441: warning: declaration of =E2=80=98stat=E2=80=99 shadows a g= lobal declaration Just rename it to fix. Signed-Off-By: Pete Zaitcev --- 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, con= st void *key, size_t key_len, { bool rcb; int fd; - struct stat stat; + struct stat statb; off64_t content_len; int rc; =20 @@ -446,12 +446,12 @@ static bool stc_put_file(struct st_client *stc, c= onst void *key, size_t key_len, if (fd < 0) return false; =20 - rc =3D fstat(fd, &stat); + rc =3D fstat(fd, &statb); if (rc) { close(fd); return false; } - content_len =3D stat.st_size; + content_len =3D statb.st_size; rcb =3D stc_put(stc, key, key_len, read_file_cb, content_len, &fd, fl= ags); close(fd); =20