[PATCH 5/7] drivers/net: fix unused but set variables

Stephen Hemminger stephen at networkplumber.org
Fri Nov 12 17:41:53 CET 2021


On Fri, 12 Nov 2021 16:38:37 +0000
"Walsh, Conor" <conor.walsh at intel.com> wrote:

> Would something along the lines of this make more sense?
> 
> #ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX
> completed += vmxnet3_unmap_pkt(tcd->txdIdx, txq);
> #else
> vmxnet3_unmap_pkt(tcd->txdIdx, txq);
> #endif
> 
> Thanks,
> Conor.

Why not just
	RTE_USED(completed);

#ifdef's introduce more testing issues.



More information about the dev mailing list