* [PATCH] xfstests: fix format string warnings in locktest.c
@ 2010-01-21 11:34 Christoph Hellwig
2010-01-21 14:02 ` Alex Elder
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2010-01-21 11:34 UTC (permalink / raw)
To: xfs
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfstests-dev/src/locktest.c
===================================================================
--- xfstests-dev.orig/src/locktest.c 2010-01-21 11:26:53.000000000 +0000
+++ xfstests-dev/src/locktest.c 2010-01-21 11:27:13.000000000 +0000
@@ -741,7 +741,7 @@ send_ctl(void)
if (nwrite < 0)
perror("send_ctl: write");
else
- fprintf(stderr, "send_ctl[%d]: write() returns %d, not %lu as expected\n",
+ fprintf(stderr, "send_ctl[%d]: write() returns %d, not %zu as expected\n",
ctl.test, nwrite, sizeof(ctl));
exit(1);
/*NOTREACHED*/
@@ -756,7 +756,7 @@ void recv_ctl(void)
if (nread < 0)
perror("recv_ctl: read");
else {
- fprintf(stderr, "recv_ctl[%d]: read() returns %d, not %lu as expected\n",
+ fprintf(stderr, "recv_ctl[%d]: read() returns %d, not %zu as expected\n",
ctl.test, nread, sizeof(ctl));
fprintf(stderr, "socket might has been closed by other locktest\n");
}
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] xfstests: fix format string warnings in locktest.c
2010-01-21 11:34 [PATCH] xfstests: fix format string warnings in locktest.c Christoph Hellwig
@ 2010-01-21 14:02 ` Alex Elder
2010-01-21 16:34 ` Alex Elder
0 siblings, 1 reply; 6+ messages in thread
From: Alex Elder @ 2010-01-21 14:02 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Looks good.
Reviewed-by: Alex Elder <aelder@sgi.com>
> Index: xfstests-dev/src/locktest.c
> ===================================================================
> --- xfstests-dev.orig/src/locktest.c 2010-01-21 11:26:53.000000000 +0000
> +++ xfstests-dev/src/locktest.c 2010-01-21 11:27:13.000000000 +0000
> @@ -741,7 +741,7 @@ send_ctl(void)
> if (nwrite < 0)
> perror("send_ctl: write");
> else
> - fprintf(stderr, "send_ctl[%d]: write() returns %d, not %lu as expected\n",
> + fprintf(stderr, "send_ctl[%d]: write() returns %d, not %zu as expected\n",
> ctl.test, nwrite, sizeof(ctl));
> exit(1);
> /*NOTREACHED*/
> @@ -756,7 +756,7 @@ void recv_ctl(void)
> if (nread < 0)
> perror("recv_ctl: read");
> else {
> - fprintf(stderr, "recv_ctl[%d]: read() returns %d, not %lu as expected\n",
> + fprintf(stderr, "recv_ctl[%d]: read() returns %d, not %zu as expected\n",
> ctl.test, nread, sizeof(ctl));
> fprintf(stderr, "socket might has been closed by other locktest\n");
> }
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] xfstests: fix format string warnings in locktest.c
2010-01-21 14:02 ` Alex Elder
@ 2010-01-21 16:34 ` Alex Elder
2010-01-21 17:32 ` Christoph Hellwig
0 siblings, 1 reply; 6+ messages in thread
From: Alex Elder @ 2010-01-21 16:34 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Alex Elder wrote:
> Christoph Hellwig wrote:
>> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Looks good.
>
> Reviewed-by: Alex Elder <aelder@sgi.com>
By the way, the content of this patch is already incorporated
in Dave's patch "[7/8] xfstests: fix printf warnings in loctest.c".
http://patchwork.xfs.org/patch/517/
>> Index: xfstests-dev/src/locktest.c
>> ===================================================================
>> --- xfstests-dev.orig/src/locktest.c 2010-01-21 11:26:53.000000000 +0000
>> +++ xfstests-dev/src/locktest.c 2010-01-21 11:27:13.000000000 +0000
>> @@ -741,7 +741,7 @@ send_ctl(void)
>> if (nwrite < 0)
>> perror("send_ctl: write");
>> else
>> - fprintf(stderr, "send_ctl[%d]: write() returns %d, not %lu as expected\n",
>> + fprintf(stderr, "send_ctl[%d]: write() returns %d, not %zu as expected\n",
>> ctl.test, nwrite, sizeof(ctl)); exit(1);
>> /*NOTREACHED*/
>> @@ -756,7 +756,7 @@ void recv_ctl(void)
>> if (nread < 0)
>> perror("recv_ctl: read");
>> else {
>> - fprintf(stderr, "recv_ctl[%d]: read() returns %d, not %lu as expected\n",
>> + fprintf(stderr, "recv_ctl[%d]: read() returns %d, not %zu as expected\n",
>> ctl.test, nread, sizeof(ctl));
>> fprintf(stderr, "socket might has been closed by other locktest\n"); }
>>
>> _______________________________________________
>> xfs mailing list
>> xfs@oss.sgi.com
>> http://oss.sgi.com/mailman/listinfo/xfs
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfstests: fix format string warnings in locktest.c
2010-01-21 16:34 ` Alex Elder
@ 2010-01-21 17:32 ` Christoph Hellwig
2010-01-21 17:50 ` Alex Elder
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2010-01-21 17:32 UTC (permalink / raw)
To: Alex Elder; +Cc: Christoph Hellwig, xfs
On Thu, Jan 21, 2010 at 10:34:12AM -0600, Alex Elder wrote:
> Alex Elder wrote:
> > Christoph Hellwig wrote:
> >> Signed-off-by: Christoph Hellwig <hch@lst.de>
> >
> > Looks good.
> >
> > Reviewed-by: Alex Elder <aelder@sgi.com>
>
> By the way, the content of this patch is already incorporated
> in Dave's patch "[7/8] xfstests: fix printf warnings in loctest.c".
> http://patchwork.xfs.org/patch/517/
Dave fixed the warnings not quite correctly, he switched from %d which
was totally wrong to %lu which is only correct on some 64-bit
architectures. %zd is the really correct format.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] xfstests: fix format string warnings in locktest.c
2010-01-21 17:32 ` Christoph Hellwig
@ 2010-01-21 17:50 ` Alex Elder
2010-01-21 17:54 ` Christoph Hellwig
0 siblings, 1 reply; 6+ messages in thread
From: Alex Elder @ 2010-01-21 17:50 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Christoph Hellwig wrote:
> On Thu, Jan 21, 2010 at 10:34:12AM -0600, Alex Elder wrote:
>> Alex Elder wrote:
>>> Christoph Hellwig wrote:
>>>> Signed-off-by: Christoph Hellwig <hch@lst.de>
>>>
>>> Looks good.
>>>
>>> Reviewed-by: Alex Elder <aelder@sgi.com>
>>
>> By the way, the content of this patch is already incorporated
>> in Dave's patch "[7/8] xfstests: fix printf warnings in loctest.c".
>> http://patchwork.xfs.org/patch/517/
>
> Dave fixed the warnings not quite correctly, he switched from %d which
> was totally wrong to %lu which is only correct on some 64-bit
> architectures. %zd is the really correct format.
Ah, yes, you are correct. So the right fix is a combination
of the two patches. All I noticed was that when I tried to
apply your patch on top of Dave's it didn't work...
Thanks.
-Alex
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfstests: fix format string warnings in locktest.c
2010-01-21 17:50 ` Alex Elder
@ 2010-01-21 17:54 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2010-01-21 17:54 UTC (permalink / raw)
To: Alex Elder; +Cc: Christoph Hellwig, xfs
On Thu, Jan 21, 2010 at 11:50:17AM -0600, Alex Elder wrote:
> Ah, yes, you are correct. So the right fix is a combination
> of the two patches. All I noticed was that when I tried to
> apply your patch on top of Dave's it didn't work...
I just commited mine to the xfstests-dev tree which already contains
Dave's patch and everything went fine.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-21 17:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-21 11:34 [PATCH] xfstests: fix format string warnings in locktest.c Christoph Hellwig
2010-01-21 14:02 ` Alex Elder
2010-01-21 16:34 ` Alex Elder
2010-01-21 17:32 ` Christoph Hellwig
2010-01-21 17:50 ` Alex Elder
2010-01-21 17:54 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox