lkml.org 
[lkml]   [2015]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Doc: networking: txtimestamp: fix printf format warning
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.

Thanks,
Richard


\
 
 \ /
  Last update: 2015-06-04 20:21    [W:0.046 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site