Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVC5k-0007pF-4M for qemu-devel@nongnu.org; Wed, 13 Jan 2010 17:53:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVC5j-0007p3-Gb for qemu-devel@nongnu.org; Wed, 13 Jan 2010 17:53:31 -0500 Received: from [199.232.76.173] (port=36783 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVC5j-0007p0-EX for qemu-devel@nongnu.org; Wed, 13 Jan 2010 17:53:31 -0500 Received: from ey-out-1920.google.com ([74.125.78.148]:28185) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NVC5i-0006pN-AY for qemu-devel@nongnu.org; Wed, 13 Jan 2010 17:53:30 -0500 Received: by ey-out-1920.google.com with SMTP id 5so23556eyb.14 for ; Wed, 13 Jan 2010 14:53:28 -0800 (PST) Received: from localhost ([127.0.0.1] helo=[192.168.1.2]) by skyserv with esmtp (Exim 4.71) (envelope-from ) id 1NVC5e-0001hM-3c for qemu-devel@nongnu.org; Thu, 14 Jan 2010 01:53:26 +0300 From: "Igor V. Kovalenko" Date: Thu, 14 Jan 2010 01:53:25 +0300 Message-ID: <20100113225325.6508.46954.stgit@skyserv> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [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: qemu-devel@nongnu.org From: Igor V. Kovalenko Currently we do not implement VLAN tagging for rtl8139(C+), still data is read from ring buffer headers. - augment unused assignment with TODO item - cast txdw1 to void for now Signed-off-by: Igor V. Kovalenko --- hw/rtl8139.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) 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; + /* w0 ownership flag */ #define CP_TX_OWN (1<<31) /* w0 end of ring flag */ @@ -2045,6 +2049,7 @@ static int rtl8139_cplus_transmit_one(RTL8139State *s) /* update ring data */ val = cpu_to_le32(txdw0); cpu_physical_memory_write(cplus_tx_ring_desc, (uint8_t *)&val, 4); + /* 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);