On Mon, Sep 10, 2018 at 11:07:08AM +0000, Keshav Gupta wrote: > Hi Ben > I am not quite getting the below error. I believe this may be > coming because of existing macro atomic_read_explicit definition. > #define atomic_read_explicit(SRC, DST, ORDER) \ > (*(DST) = atomic_load_explicit(SRC, ORDER), \ > (void) 0) > Where I believe it is cribbing for (void)0 which gcc is cribbing that it may > not have any effect. I have corrected the other errors. > > I see some discussion of this sort in this URL. > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61081 > From the discussion if I understood correctly it is a false alarm present > from gcc 4.9. > > > >> In file included from ../lib/ovs-atomic.h:331, > >> from ../lib/dpif-netdev-perf.h:32, > >> from ../lib/dpif-netdev-perf.c:20: > >> ../lib/dpif-netdev-perf.c: In function 'pmd_perf_drop_stats_clear': > >> ../lib/ovs-atomic-c11.h:31:47: error: right-hand operand of comma > >> expression has no effect [-Werror=unused-value] > >> (*(DST) = atomic_load_explicit(SRC, ORDER), \ > >> ^ > >> ../lib/ovs-atomic.h:401:5: note: in expansion of macro > >> 'atomic_read_explicit' > >> atomic_read_explicit(VAR, DST, memory_order_relaxed) > >> ^~~~~~~~~~~~~~~~~~~~ > >> ../lib/dpif-netdev-perf.c:474:9: note: in expansion of macro > 'atomic_read_relaxed' > >> atomic_read_relaxed(&s->drop_counters.n.rx_drops[i], > >> ^~~~~~~~~~~~~~~~~~~ > >> ../lib/ovs-atomic-c11.h:31:47: error: right-hand operand of comma > expression has no effect [-Werror=unused-value] > (*(DST) = atomic_load_explicit(SRC, ORDER), \
One problem I see is that you're trying to use atomic_read_relaxed() to store into an atomic variable. It's only for reading one, not writing to one. Try fixing that. _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev