lkml.org 
[lkml]   [2021]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/22] perf tools: Add debug_set_display_time function
Em Tue, Jan 19, 2021 at 06:39:37PM +0100, Jiri Olsa escreveu:
> On Tue, Jan 19, 2021 at 11:59:22AM -0300, Arnaldo Carvalho de Melo wrote:
>
> SNIP
>
> > > +}
> >
> > 78 12.70 ubuntu:18.04-x-sparc64 : FAIL sparc64-linux-gnu-gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
> >
> > util/debug.c: In function 'fprintf_time':
> > util/debug.c:63:32: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type '__suseconds_t {aka int}' [-Werror=format=]
> > return fprintf(file, "[%s.%06lu] ", date, tod.tv_usec);
> > ~~~~^ ~~~~~~~~~~~
> > %06u
> >
> > I'll try to fix it.
>
> thanks, hopefuly the %u will do

cast to long, i.e.:

return fprintf(file, "[%s.%06lu] ", date, (long)tod.tv_usec);

- Arnaldo

\
 
 \ /
  Last update: 2021-01-19 20:44    [W:0.160 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site