Subject: Re: include/net/netlink.h:497:41: warning: ‘reply_nlh’ maybe used uninitialized in this function [-Wuninitialized]

From: Fengguang Wu <[email-masked]>
Date: Fri, 15 Jun 2012 09:55:31 +0800

On Thu, Jun 14, 2012 at 04:30:57AM -0400, Thomas Graf wrote:
> On Thu, Jun 14, 2012 at 10:07:08AM +0800, [email-masked] wrote:
> > FYI: there are new compile warnings show up in
> > 
> > tree:   git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
> > head:   0450243096de90ff51c3a6c605410c5e28d79f8d
> > commit: 33a03aadb52fa05d28aba6d8f0c03c7b3b905897 [464/472] dcbnl: Prepare framework to shorten handling functions
> > config: x86_64-randconfig-net3 (attached as .config)
> > 
> > All related error/warning messages are:
> > 
> > net/dcb/dcbnl.c: In function ‘dcb_doit’:
> > include/net/netlink.h:497:41: warning: ‘reply_nlh’ may be used uninitialized in this function [-Wuninitialized]
> > net/dcb/dcbnl.c:1975:19: note: ‘reply_nlh’ was declared here
> 
> gcc 4.6.3 on my system doesn't complain about this. I'm sending a patch.

I'm running gcc 4.6.2 and will upgrade it.  Good to know gcc improved on this!

Thanks,
Fengguang