Re: [PATCH] Doc: networking: txtimestamp: fix printf format warning

From: Frans Klaver
Date: Thu Jun 04 2015 - 14:06:13 EST


On 4 June 2015 19:36:12 CEST, Richard Cochran <richardcochran@xxxxxxxxx> wrote:
>On Wed, Jun 03, 2015 at 09:38:39PM +0200, Frans Klaver wrote:
>> Documentation/networking/timestamping/txtimestamp.c: In function
>â__print_timestampâ:
>> Documentation/networking/timestamping/txtimestamp.c:99:3: warning:
>format â%ldâ expects argument of type âlong intâ, but argument 3 has
>type âint64_tâ [-Wformat=]
>> fprintf(stderr, " (%+ld us)", cur_ms - prev_ms);
>>
>> int64_t differs per platform, so a cast is required.
>
>No cast is needed. Use PRId64 in the format string instead.

Wow, I can't believe I've never run into those...

Will resend.

Thanks,
Frans


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/