[dpdk-dev] [PATCH 5/7] vmxnet3: get rid of DEBUG ifdefs

Stephen Hemminger stephen at networkplumber.org
Wed Feb 11 03:18:22 CET 2015


On Wed, 11 Feb 2015 00:54:57 +0000
Yong Wang <yongwang at vmware.com> wrote:

> Why not
> #define VMXNET_ASSERT(x) do { (void)(0); } while (0)
> 
> or simply
> #define VMXNET_ASSERT(x)

Because that will generate unused warnings in Gcc,
and by having the compiler evaluate the result it also makes
sure that junk doesn't get put in.


More information about the dev mailing list