From b4b0e8bd0be3f9e44f453bdc7b139cee9bc7e87a Mon Sep 17 00:00:00 2001 From: shyouhei Date: Tue, 2 Jan 2018 06:41:39 +0000 Subject: [PATCH] suppress warning for clang In this function, "volatile" is specified twice in macro-expanded `VAR_INITIALIZED(cont)` part. That is a problem in fact. However I don't want to touch this line because it is already a messy workaround for clang SEGV. Let me just ignore. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- cont.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cont.c b/cont.c index 9556a32799..82e2340c3b 100644 --- a/cont.c +++ b/cont.c @@ -590,6 +590,10 @@ show_vm_pcs(const rb_control_frame_t *cfp, } } #endif +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wduplicate-decl-specifier" +#endif static VALUE cont_capture(volatile int *volatile stat) { @@ -652,6 +656,9 @@ cont_capture(volatile int *volatile stat) return contval; } } +#ifdef __clang__ +#pragma clang diagnostic pop +#endif static inline void fiber_restore_thread(rb_thread_t *th, rb_fiber_t *fib)