Re: PROBLEM: kernel 2.6.22.9-cfs-v22 compile warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Konstantin,

On Mon, Oct 08, 2007 at 03:34:24PM +0300, Konstantin Oshovskij wrote:
>
> Hello,
> i have encountered 2.6.22.9 compile warnings. This is the first time i
> decided to report them. I had various compile warnings with earlier
> kernel versions, its just i didnt had courage to report them :)  I'm
> using instructions from REPORTING-BUGS file as template so please bear
> with me :)
> 

The "may be used uninitialized" errors are false positives from GCC. Mostly
this happens from code paths like: 

int x, y; 
set_method(&x); 
y = x;

> fs/xfs/xfs_bmap.c: In function 'xfs_bmap_rtalloc':
> fs/xfs/xfs_bmap.c:2650: warning: 'rtx' is used uninitialized in this
> function
> 

Hidden by uninitialized_var() macro in latest pull. This macro silence
the gcc by using the trick: #define uninitialized_var(x) x = x

> function
> ipc/msg.c:390: warning: 'setbuf.mode' may be used uninitialized in
> this function
>   CC      ipc/sem.o
> ipc/sem.c: In function 'sys_semctl':
> ipc/sem.c:861: warning: 'setbuf.uid' may be used uninitialized in this
> function
> ipc/sem.c:861: warning: 'setbuf.gid' may be used uninitialized in this
> function
> ipc/sem.c:861: warning: 'setbuf.mode' may be used uninitialized in
> this function
> 

Already hidden now by the uninitialized_var() macro.

> drivers/pci/search.c: In function 'pci_find_slot':
> drivers/pci/search.c:99: warning: 'pci_find_device' is deprecated
> (declared at include/linux/pci.h:477)

pci_find_slot is using pci_find_device on purpose here (equivalent to the
safe pci_get_slot method).

> drivers/pci/search.c: At top level:
> drivers/pci/search.c:434: warning: 'pci_find_device' is deprecated
> (declared at drivers/pci/search.c:241)
> drivers/pci/search.c:434: warning: 'pci_find_device' is deprecated
> (declared at drivers/pci/search.c:241)
> 

False positives from function definition and from the innocent EXPORT_SYMBOL
macro (It makes the method available to kernel modules).

Regards,

-- 
Ahmed S. Darwish
HomePage: http://darwish.07.googlepages.com
Blog: http://darwish-07.blogspot.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux