* [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* Re: [Patch 2/3] chcli cleanup: gcc warning
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
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2010-03-03 2:18 UTC (permalink / raw)
To: Pete Zaitcev; +Cc: Project Hail List
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:
> Received-SPF: fail (google.com: domain of zaitcev@redhat.com 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 zaitcev@redhat.com does not designate 207.234.209.181 as permitted sender) smtp.mail=zaitcev@redhat.com
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 ;-)
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Patch 2/3] chcli cleanup: gcc warning
2010-03-03 2:18 ` Jeff Garzik
@ 2010-03-03 2:41 ` Pete Zaitcev
2010-03-03 11:45 ` Jeff Garzik
0 siblings, 1 reply; 4+ messages in thread
From: Pete Zaitcev @ 2010-03-03 2:41 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Project Hail List
On Tue, 02 Mar 2010 21:18:24 -0500
Jeff Garzik <jeff@garzik.org> 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);
> 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) {
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).
> > Received-SPF: fail (google.com: domain of zaitcev@redhat.com 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 zaitcev@redhat.com does not designate 207.234.209.181 as permitted sender) smtp.mail=zaitcev@redhat.com
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Patch 2/3] chcli cleanup: gcc warning
2010-03-03 2:41 ` Pete Zaitcev
@ 2010-03-03 11:45 ` Jeff Garzik
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2010-03-03 11:45 UTC (permalink / raw)
To: Pete Zaitcev; +Cc: Project Hail List
On 03/02/2010 09:41 PM, Pete Zaitcev wrote:
> On Tue, 02 Mar 2010 21:18:24 -0500
> Jeff Garzik<jeff@garzik.org> 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);
>
>> 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) {
>
> 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
^ permalink raw reply [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