chcli cleanup: gcc warning
PATCH 2/3 chcli cleanup: gcc warning
The variable "stat" produces the following warning:
chcli.c:441: warning: declaration of ‘stat’ shadows a global declaration
Just rename it to fix.
--- tools/chcli.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
tools/chcli.c +3 -3
@@ -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);
Note that your mailer is mangling patches via "quoted-printable":
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
[...]
=20
- rc =3D fstat(fd, &stat);
+ rc =3D fstat(fd, &st);
if (rc) {
close(fd);
return false;
}
- content_len =3D stat.st_size;
+ content_len =3D st.st_size;
rcb =3D stc_put(stc, key, key_len, read_file_cb, content_len,
Also, while on the subject of email stuff, you might want to be aware of this:
Quoted 2 lines
Received-SPF: fail (google.com: domain of [email protected] does not designate 207.234.209.181 as permitted sender) client-ip=207.234.209.181;
Authentication-Results: mx.google.com; spf=hardfail (google.com: domain of [email protected] does not designate 207.234.209.181 as permitted sender) [email protected]
If I had to guess, I would say you are sending redhat.com mail from a non-redhat-spf-authenticating box. Being a Red Hatter myself, I have no clue how to fix this, and would just ignore it ;-)
Quoted 1 line · On Tue, 02 Mar 2010 21:18:24 -0500 Jeff Garzik <[email protected]> wrote:
Note that your mailer is mangling patches via "quoted-printable":
No, it does not. Look at this:
[zaitcev@lembas ~]$ grep fstat Mail/inbox/*
Mail/inbox/10891:# diffstat add_function.patch hub_revision_ACPI_modes.patch
Mail/inbox/15830:- rc =3D fstat(fd, &stat); Mail/inbox/15830:+ rc =3D fstat(fd, &st); Mail/inbox/15833:- rc = fstat(fd, &stat); Mail/inbox/15833:+ rc = fstat(fd, &statb);
Review
Quoted 7 lines
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
[...]
=20(quoted diff) +1
-1- rc =3D fstat(fd, &stat); + rc =3D fstat(fd, &st); if (rc) {
Clearly, its your own message you are complaining about, not mine, because my patch changed the variable to 'statb' (and it's not corrupt, see above grep), while your patch changed to it to 'st'. "My mailer" did not even touch it. Heck, I did not even see that message (although I did a git pull to see if the "note" you promised was attached to the changelog).
Quoted 6 lines
Quoted 2 lines
Received-SPF: fail (google.com: domain of [email protected] does not designate 207.234.209.181 as permitted sender) client-ip=207.234.209.181;
Authentication-Results: mx.google.com; spf=hardfail (google.com: domain of [email protected] does not designate 207.234.209.181 as permitted sender) [email protected]If I had to guess, I would say you are sending redhat.com mail from a non-redhat-spf-authenticating box. Being a Red Hatter myself, I have no clue how to fix this, and would just ignore it ;-)
LOL.
1. http://david.woodhou.se/why-not-spf.html
2. No, I do not send work mail through direct SMTP connections.
What you see is exactly why SPF is harmful shit:
step 1: I send mail to list
step 2: vget forwards it to your MX:
[zaitcev@lembas ~]$ host -t mx garzik.org
garzik.org mail is handled by 10 mx1.dvmed.net. [zaitcev@lembas ~]$ host mx1.dvmed.net.
mx1.dvmed.net has address 207.234.209.181
step 3: your redirector at srv1.dvmed.net forwards it to Google step 4: Google Mail is run by morons who implement SPF checking
Cheers,
-- Pete
Quoted 14 lines · Pete Zaitcev
Quoted 1 line · On Tue, 02 Mar 2010 21:18:24 -0500 Jeff Garzik<[email protected]> wrote:
Note that your mailer is mangling patches via "quoted-printable":
No, it does not. Look at this:
[zaitcev@lembas ~]$ grep fstat Mail/inbox/*
Mail/inbox/10891:# diffstat add_function.patch hub_revision_ACPI_modes.patchMail/inbox/15830:- rc =3D fstat(fd,&stat); Mail/inbox/15830:+ rc =3D fstat(fd,&st); Mail/inbox/15833:- rc = fstat(fd,&stat); Mail/inbox/15833:+ rc = fstat(fd,&statb);
Quoted 14 lines
Review
Quoted 7 lines
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
[...]
=20(quoted diff) +1
-1- rc =3D fstat(fd,&stat); + rc =3D fstat(fd,&st); if (rc) {Clearly, its your own message you are complaining about, not mine, because my patch changed the variable to 'statb' (and it's not corrupt, see above grep), while your patch changed to it to 'st'. "My mailer" did not even touch it. Heck, I did not even see that message (although I did a git pull to see if the "note" you promised was attached to the changelog).
I manually changed s/statb/st/ using vi directly on the Berkeley mbox file. Don't get confused by that.
Ignore the variable name change and look at the quoted-printable artifacts "=3D", "=20", etc...
Jeff