Re: [PATCH] perf tools: fix type mismatch - long vs __statfs_word

From: Alexey Brodkin
Date: Mon Sep 15 2014 - 06:26:26 EST


Hi Arnaldo, Jiri,

> On Wednesday 13 August 2014 10:34 PM, Alexey Brodkin wrote:
> > From "include/uapi/asm-generic/statfs.h" it is seen that "statfs.f_type" is of
> > type "__statfs_word" which in its turn is "__u32" (unsigned int) for 32-bit
> > systems.
> >
> > So in case of compilation with "-Werror" following breakage happens:
> > --->---
> > fs.c: In function âfs__valid_mountâ:
> > fs.c:76:24: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
> > else if (st_fs.f_type != magic)
> > ^
> > cc1: all warnings being treated as errors
> > --->---
> >
> > Note that now when fs.c is in "lib/api/fs" and in "tools/lib/api/Makefile"
> > CFLAGS has hard-coded "-Werror" this is inevitable even if one builds "perf"
> > with "WERROR=0".
> >

I'm wondering if there's a chance to get this patch accepted because for
now perf building from 3.15 kernels onward is broken.

Regards,
Alexey