From owner-svn-src-head@FreeBSD.ORG Mon Jun 30 15:03:37 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 239D962C; Mon, 30 Jun 2014 15:03:37 +0000 (UTC) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id D76DC2111; Mon, 30 Jun 2014 15:03:36 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id D209F7300A; Mon, 30 Jun 2014 17:06:58 +0200 (CEST) Date: Mon, 30 Jun 2014 17:06:58 +0200 From: Luigi Rizzo To: Adrian Chadd Subject: Re: svn commit: r268028 - head/sys/dev/e1000 Message-ID: <20140630150658.GA4742@onelab2.iet.unipi.it> References: <201406300434.s5U4YxGY043870@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 15:03:37 -0000 On Mon, Jun 30, 2014 at 04:56:01PM +0200, Luigi Rizzo wrote: > I am getting the following error while compiling with gcc: > > cc1: warnings being treated as errors > /usr/home/luigi/FreeBSD/head/sys/dev/e1000/if_igb.c: In function > 'igb_attach': > /usr/home/luigi/FreeBSD/head/sys/dev/e1000/if_igb.c:2461: warning: 'cpu_id' > may be used uninitialized in this function > /usr/home/luigi/FreeBSD/head/sys/dev/e1000/if_igb.c:2461: note: 'cpu_id' > was declared here > > (the code is correct, apparently gcc cannot understand that). > > For compatibility i'd throw in an explicit initialization, > however it might be worthwhile rewriting the code with a single > if (adapter->num_queues > 1) { ...} block within the for(), > and also using only one #ifdef RSS -- the other places only > differ in the string passed to diagnostics or comments. and the same goes for the recent changes to ixgbe.c cheers luigi