lkml.org 
[lkml]   [2015]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/44] perf tools: Add user events for AUX area tracing
Em Mon, Apr 20, 2015 at 08:06:45PM -0300, Arnaldo Carvalho de Melo escreveu:
> I noticed it tho because of this:
>
> util/session.c: In function ‘skipn’:
> util/session.c:279:28: error: comparison between signed and unsigned
> integer expressions [-Werror=sign-compare]
> ret = read(fd, buf, MIN(n, sizeof(buf)));
> ^
> util/session.c:279:47: error: signed and unsigned type in conditional
> expression [-Werror=sign-compare]
> ret = read(fd, buf, MIN(n, sizeof(buf)));
> ^
> cc1: all warnings being treated as errors
> make[3]: *** [/tmp/build/perf/util/session.o] Error 1
> make[3]: *** Waiting for unfinished jobs....
>
> Fixing it to be:
>
> ret = read(fd, buf, min(n, (off_t)sizeof(buf)));
>
> Ok?

I think the right thing would be for us to adopt min_t() and friends, as
defined in include/linux/kernel.h, but will leave this for later...

- Arnaldo



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