]> git.droids-corp.org - dpdk.git/commitdiff
net/vmxnet3: fix build with clang 13
authorConor Walsh <conor.walsh@intel.com>
Mon, 15 Nov 2021 17:58:54 +0000 (17:58 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 16 Nov 2021 12:02:27 +0000 (13:02 +0100)
The completed variable is used for debug logs even though clang 13
reports it as unused.

Bugzilla ID: 881
Fixes: c3ecdbb376da ("vmxnet3: support TSO")
Cc: stable@dpdk.org
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
drivers/net/vmxnet3/vmxnet3_rxtx.c

index deba64be6a20ac8b90b94c2bef0a02ac427b7b18..d745064bc42c8f194d1f96c2b289a6a5a5fc3635 100644 (file)
@@ -340,6 +340,9 @@ vmxnet3_tq_tx_complete(vmxnet3_tx_queue_t *txq)
        }
 
        PMD_TX_LOG(DEBUG, "Processed %d tx comps & command descs.", completed);
+
+       /* To avoid compiler warnings when not in DEBUG mode. */
+       RTE_SET_USED(completed);
 }
 
 uint16_t