Re: [PATCH 03/44] perf tools: Add user events for AUX area tracing

From: Arnaldo Carvalho de Melo
Date: Mon Apr 20 2015 - 19:10:38 EST


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

--
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/