util: Make Solaris implemention of p_atomic_add work with gcc
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Sun, 12 Feb 2017 02:35:55 +0000 (18:35 -0800)
committerEric Engestrom <eric.engestrom@intel.com>
Wed, 16 Oct 2019 12:45:57 +0000 (13:45 +0100)
commita56c3e3a470eb8f13d11ca0aad5b5934de54ca1c
tree42d9f60dbe7e24f29552872b44718e2f50a5bcfd
parentddde652e7000a13e3431316ad9ad7d1237552a0b
util: Make Solaris implemention of p_atomic_add work with gcc

gcc is very particular about where you place the (void) cast
The previous placement made it error out with:

In file included from disk_cache.c:40:0:
../../src/util/u_atomic.h:203:29: error: void value not ignored as it ought to be
 #define p_atomic_add(v, i) ((void)         \
                              ^
disk_cache.c:658:4: note: in expansion of macro ‘p_atomic_add’
    p_atomic_add(cache->size, size);
    ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/util/u_atomic.h