lkml.org 
[lkml]   [2013]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: linux-next: build warning after merge of the char-misc tree
    Date
    On Friday 15 February 2013, Greg KH wrote:
    > On Fri, Feb 15, 2013 at 04:26:57PM +1100, Stephen Rothwell wrote:
    > > Hi all,
    > >
    > > After merging the char-misc tree, today's linux-next build (x86_64
    > > allmodconfig) produced this warning:
    > >
    > > drivers/w1/slaves/w1_therm.c: In function 'w1_therm_read':
    > > drivers/w1/slaves/w1_therm.c:245:15: warning: 'crc' may be used uninitialized in this function [-Wuninitialized]
    > >
    > > Its a false positive, but it was introduced by commit 867ff9880d5d
    > > ("w1_therm: Retries: remove old code add CRC")
    >
    > I don't see that here with gcc 4.7.1, perhaps you need to upgrade your
    > version of gcc to not show these false positives?

    I see the same warning with gcc-4.6.3, 4.7.2 and 4.8.0-20130114 on ARM.

    In case of 4.8, the output is

    drivers/w1/slaves/w1_therm.c: In function 'w1_therm_read':
    drivers/w1/slaves/w1_therm.c:245:15: warning: 'crc' may be used uninitialized in this function [-Wmaybe-uninitialized]
    c -= snprintf(buf + PAGE_SIZE - c, c, ": crc=%02x %s\n",
    ^

    I actually see much more of these false positives with 4.7 and 4.8 than
    I get with 4.6, which is the main reason for me to use 4.6 for my daily
    builds. I agree that this particular false positive is an especially
    dumb one and it would be good to not just shut up gcc by initializing
    it, but I have no other idea what to do with the hundreds of such
    warnings I get.

    Arnd


    \
     
     \ /
      Last update: 2013-02-15 19:41    [W:5.601 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site