Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1589831

Re: [PATCH 11/13] fs: fix unsigned enum warning with gcc-4.2

From Brendan Gregg <brendan.d.gregg@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 11/13] fs: fix unsigned enum warning with gcc-4.2
Date 2017-02-28 23:00 +0100
Message-ID <tfXYl-1Fm-15@gated-at.bofh.it> (permalink)
References <sOYp3-2rU-5@gated-at.bofh.it> <sOYp3-2rU-13@gated-at.bofh.it> <sVG41-4nb-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jan 3, 2017 at 2:47 PM, Brendan Gregg <brendan.d.gregg@gmail.com> wrote:
>
> On Fri, Dec 16, 2016 at 2:56 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > With arm-linux-gcc-4.2, almost every file we build in the kernel ends
> > up with this warning:
> >
> > include/linux/fs.h:2648: warning: comparison of unsigned expression < 0 is always false
> >
>
> Thanks, I'd like to see this fixed as a similar warning gets printed
> whenever running many of the bcc/BPF tools, which gets annoying and is
> user-visible. eg:
>
> # /usr/share/bcc/tools/xfsslower 1
> In file included from /virtual/main.c:3:
> /lib/modules/4.8.6-300.fc25.x86_64/build/include/linux/fs.h:2677:9:
> warning: comparison of unsigned enum expression < 0 is always false
> [-Wtautological-compare]
>         if (id < 0 || id >= READING_MAX_ID)
>             ~~ ^ ~
> 1 warning generated.
> Tracing XFS operations slower than 1 ms
> TIME     COMM           PID    T BYTES   OFF_KB   LAT(ms) FILENAME
> 14:44:27 cksum          4414   R 65536   0           1.02 chcon
> 14:44:27 cksum          4414   R 65536   0           1.20 cpio
> 14:44:27 cksum          4414   R 65536   0           1.01 diff
> 14:44:27 cksum          4414   R 65536   0           1.15 dir
> [...]
>
> This patch fixes the warning.
>

What's the status of this patch? I still get these warnings on latest. Thanks,

Brendan

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 11/13] fs: fix unsigned enum warning with gcc-4.2 Brendan Gregg <brendan.d.gregg@gmail.com> - 2017-02-28 23:00 +0100

csiph-web