From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbDDR-0005jG-Aj for qemu-devel@nongnu.org; Thu, 15 Dec 2011 10:27:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbDDF-0005ix-4G for qemu-devel@nongnu.org; Thu, 15 Dec 2011 10:27:25 -0500 Received: from e31.co.us.ibm.com ([32.97.110.149]:39575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbDDE-0005if-VB for qemu-devel@nongnu.org; Thu, 15 Dec 2011 10:27:13 -0500 Received: from /spool/local by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 15 Dec 2011 08:27:11 -0700 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBFFR1X9058276 for ; Thu, 15 Dec 2011 08:27:02 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBFFQwRj030417 for ; Thu, 15 Dec 2011 08:26:59 -0700 Message-ID: <4EEA11BF.1020405@us.ibm.com> Date: Thu, 15 Dec 2011 09:26:55 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1321242349-4140-1-git-send-email-coreyb@linux.vnet.ibm.com> <1321242349-4140-5-git-send-email-coreyb@linux.vnet.ibm.com> In-Reply-To: <1321242349-4140-5-git-send-email-coreyb@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v5 4/4] Add support for net bridge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Corey Bryant Cc: rmarwah@linux.vnet.ibm.com, qemu-devel@nongnu.org On 11/13/2011 09:45 PM, Corey Bryant wrote: > The most common use of -net tap is to connect a tap device to a bridge. This > requires the use of a script and running qemu as root in order to allocate a > tap device to pass to the script. This patch breaks the build: anthony@titi:~/build/qemu$ make CC net/tap.o cc1: warnings being treated as errors /home/anthony/git/qemu/net/tap.c: In function ‘net_init_tap’: /home/anthony/git/qemu/net/tap.c:560:15: error: ‘s’ may be used uninitialized in this function make: *** [net/tap.o] Error 1 > > - s = net_tap_fd_init(vlan, "tap", name, fd, vnet_hdr); > - if (!s) { > - close(fd); > - return -1; > + s = net_tap_fd_init(vlan, "tap", name, fd, vnet_hdr); > + if (!s) { > + close(fd); > + return -1; > + } > } And indeed, you've changed the function from unconditionally initializing s to conditionally initializing it. Specifically, you've broken -net tap,fd=X which would break tools like libvirt. Regards, Anthony Liguori