From 57369c1c70e4f48fefc1d11a14f30f22c4e0e877 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Thu, 2 Aug 2018 13:03:34 +0000 Subject: [PATCH] mjit.c: suppress warnings by -Wunused-value on MinGW with __atomic_exchange_n(). It returns the previous pointer value but obviously it's not needed in MJIT's usage. mjit.c: In function 'compact_all_jit_code': ruby_atomic.h:11:36: warning: value computed is not used [-Wunused-value] # define ATOMIC_EXCHANGE(var, val) __atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- mjit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mjit.c b/mjit.c index 58fe0cb1d1..efe281fb22 100644 --- a/mjit.c +++ b/mjit.c @@ -140,7 +140,7 @@ typedef intptr_t pid_t; #endif /* Atomically set function pointer if possible. */ -#define MJIT_ATOMIC_SET(var, val) ATOMIC_PTR_EXCHANGE(var, val) +#define MJIT_ATOMIC_SET(var, val) (void)ATOMIC_PTR_EXCHANGE(var, val) /* A copy of MJIT portion of MRI options since MJIT initialization. We need them as MJIT threads still can work when the most MRI data were