[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <C2D7FE5348E1B147BCA15975FBA230753C5D0B10@IN01WEMBXA.internal.synopsys.com>
Date: Thu, 4 Sep 2014 05:45:22 +0000
From: Vineet Gupta <Vineet.Gupta1@...opsys.com>
To: Alexey Brodkin <Alexey.Brodkin@...opsys.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: Borislav Petkov <bp@...e.de>, Jiri Olsa <jolsa@...nel.org>,
Cody P Schafer <dev@...yps.com>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
peter Zijlstra <peterz@...radead.org>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: Re: [PATCH] perf tools: fix type mismatch - long vs __statfs_word
+CC acme, Peter
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".
>
> Signed-off-by: Alexey Brodkin <abrodkin@...opsys.com>
>
> Cc: Vineet Gupta <vgupta@...opsys.com>
> Cc: Borislav Petkov <bp@...e.de>
> Cc: Jiri Olsa <jolsa@...nel.org>
> Cc: Cody P Schafer <dev@...yps.com>
> Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> ---
> tools/lib/api/fs/fs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/lib/api/fs/fs.c b/tools/lib/api/fs/fs.c
> index c1b49c3..4b2fa7b 100644
> --- a/tools/lib/api/fs/fs.c
> +++ b/tools/lib/api/fs/fs.c
> @@ -75,7 +75,7 @@ static int fs__valid_mount(const char *fs, long magic)
>
> if (statfs(fs, &st_fs) < 0)
> return -ENOENT;
> - else if (st_fs.f_type != magic)
> + else if ((long)st_fs.f_type != magic)
> return -ENOENT;
>
> return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists