From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVgk3-00080X-6Y for qemu-devel@nongnu.org; Fri, 15 Jan 2010 02:37:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVgjw-0007zQ-MT for qemu-devel@nongnu.org; Fri, 15 Jan 2010 02:37:09 -0500 Received: from [199.232.76.173] (port=34363 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVgju-0007yy-FJ for qemu-devel@nongnu.org; Fri, 15 Jan 2010 02:37:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45762) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NVgju-0002OF-0z for qemu-devel@nongnu.org; Fri, 15 Jan 2010 02:37:02 -0500 Message-ID: <4B501485.3080706@redhat.com> Date: Fri, 15 Jan 2010 08:08:53 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <20100113225325.6508.46954.stgit@skyserv> In-Reply-To: <20100113225325.6508.46954.stgit@skyserv> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] rtl8139: fix clang reporting unused assignment of VLAN tagging data List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Igor V. Kovalenko" Cc: qemu-devel@nongnu.org > diff --git a/hw/rtl8139.c b/hw/rtl8139.c > index 1f4f585..f04dd54 100644 > --- a/hw/rtl8139.c > +++ b/hw/rtl8139.c > @@ -1909,6 +1909,7 @@ static int rtl8139_cplus_transmit_one(RTL8139State *s) > > cpu_physical_memory_read(cplus_tx_ring_desc, (uint8_t *)&val, 4); > txdw0 = le32_to_cpu(val); > + /* TODO: implement VLAN tagging support, VLAN tag data is read to txdw1 */ > cpu_physical_memory_read(cplus_tx_ring_desc+4, (uint8_t *)&val, 4); > txdw1 = le32_to_cpu(val); > cpu_physical_memory_read(cplus_tx_ring_desc+8, (uint8_t *)&val, 4); > @@ -1920,6 +1921,9 @@ static int rtl8139_cplus_transmit_one(RTL8139State *s) > descriptor, > txdw0, txdw1, txbufLO, txbufHI)); > > + /* TODO: the following discard cast should clean clang analyzer output */ > + (void)txdw1; I don't like this, why not comment it out like here: > + /* TODO: implement VLAN tagging support, VLAN tag data is read to txdw1 */ > // val = cpu_to_le32(txdw1); > // cpu_physical_memory_write(cplus_tx_ring_desc+4,&val, 4); (and maybe change this one as well to #if 0...#endif, I don't know). Paolo