Re: [ovs-dev] [PATCH] dpif-netdev: Fix a compilation warning

2014-03-25 Thread Pravin Shelar
On Mon, Mar 24, 2014 at 10:53 PM, Ben Pfaff wrote: > I'd rather go with inline here because it will not warn about unused > variables, whereas I expect that "do {} while (0)" will in at least some > cases. > make sense. Thanks. > On Mon, Mar 24, 2014 at 10:51:11PM -0700, Andy Zhou wrote: >> Th

Re: [ovs-dev] [PATCH] dpif-netdev: Fix a compilation warning

2014-03-24 Thread Andy Zhou
Thanks, pushed. On Mon, Mar 24, 2014 at 10:53 PM, Ben Pfaff wrote: > I'd rather go with inline here because it will not warn about unused > variables, whereas I expect that "do {} while (0)" will in at least some > cases. > > On Mon, Mar 24, 2014 at 10:51:11PM -0700, Andy Zhou wrote: >> Thanks Pr

Re: [ovs-dev] [PATCH] dpif-netdev: Fix a compilation warning

2014-03-24 Thread Ben Pfaff
I'd rather go with inline here because it will not warn about unused variables, whereas I expect that "do {} while (0)" will in at least some cases. On Mon, Mar 24, 2014 at 10:51:11PM -0700, Andy Zhou wrote: > Thanks Pravin, I will push it soon so that other people won't run into > build issues. >

Re: [ovs-dev] [PATCH] dpif-netdev: Fix a compilation warning

2014-03-24 Thread Andy Zhou
Thanks Pravin, I will push it soon so that other people won't run into build issues. I agree with you that do / while will also work for void function types. It is shorter than inline although inline provides argument type checking. Would do{} while (0) work for none void functions? What happens

Re: [ovs-dev] [PATCH] dpif-netdev: Fix a compilation warning

2014-03-24 Thread Pravin Shelar
On Mon, Mar 24, 2014 at 9:23 PM, Andy Zhou wrote: > Building OVS tree without DPDK produced the following warning message. > lib/dpif-netdev.c:1868:5: error: statement with no effect > > This error message is complaining the return value of the following > macro, (0), is not being used. >

[ovs-dev] [PATCH] dpif-netdev: Fix a compilation warning

2014-03-24 Thread Andy Zhou
Building OVS tree without DPDK produced the following warning message. lib/dpif-netdev.c:1868:5: error: statement with no effect This error message is complaining the return value of the following macro, (0), is not being used. #define pmd_thread_setaffinity_cpu(c) (0) The patch fixe