On Tue, Jul 29, 2014 at 09:56:46PM +0800, Wang Shilong wrote:
> Hi David,
>
> > On Sun, Jul 27, 2014 at 12:49:55AM +0800, Wang Shilong wrote:
> >> cmds-restore.c:120:4: warning: format %lu expects argument of type
> >> long unsigned int, but argument 3 has type size_t [-Wformat=]
> >> fprintf(stderr, "bad compress length %lu\n", in_len);
> >
> >> --- a/cmds-restore.c
> >> +++ b/cmds-restore.c
> >> @@ -117,7 +117,7 @@ static int decompress_lzo(unsigned char *inbuf, char *outbuf, u64 compress_len,
> >> in_len = read_compress_length(inbuf);
> >>
> >> if ((tot_in + LZO_LEN + in_len) > tot_len) {
> >> - fprintf(stderr, "bad compress length %lu\n", in_len);
> >> + fprintf(stderr, "bad compress length %u\n", in_len);
> >
> > in_len is size_t, this prints a warning on 64bit. Let's make it %lu and
> > cas to unsigned long (fixed locally, no need to resend), we'er not using
> > the 'z' size_t modifier for printf anywhere.
>
>
> I am sorry that i forgot to test the patch on 64bit. As i have left current
> company, i could not setup a 64 bit machine until next week.
>
> So i will appreciate it if you could fix this when merging or wait
> until next week once i got a 64bit machine.
No problem, already fixed.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html