[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1425583623.2556.142.camel@jtkirshe-mobl>
Date: Thu, 05 Mar 2015 11:27:03 -0800
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
To: Alexander Duyck <alexander.h.duyck@...hat.com>
Cc: netdev@...r.kernel.org, e1000-devel@...ts.sourceforge.net
Subject: Re: [net-next PATCH 1/2] igb: Fix warning
‘pin’ may be used uninitialized
On Thu, 2015-03-05 at 11:24 -0800, Alexander Duyck wrote:
> When building the kernel using the gcc 4.8.3 compiler included in
> Fedora 20
> I was repeatedly seeing the warning:
>
> drivers/net/ethernet/intel/igb/igb_ptp.c: In function
> ‘igb_ptp_feature_enable_i210’:
> drivers/net/ethernet/intel/igb/igb_ptp.c:395:21: warning: ‘pin’ may
> be used uninitialized in this function
> [-Wmaybe-uninitialized]
> tssdp &= ~ts_sdp_en[pin];
> ^
> drivers/net/ethernet/intel/igb/igb_ptp.c:471:6: note: ‘pin’ was
> declared here
> int pin;
> ^
>
> To resolve it I am assigning the pin a value of -1 when it is
> instantiated.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@...hat.com>
> ---
> drivers/net/ethernet/intel/igb/igb_ptp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks Alex, I have added your patch to my queue.
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists