From e18259424ea6f1baafacab442d57c05d51c2548b Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 4 Apr 2014 08:34:12 +0000 Subject: eval_intern.h: VAR_INITIALIZED * eval_intern.h (VAR_INITIALIZED): macro to suppress maybe-uninitialized warnings by gcc 4.7 and 4.8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- cont.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cont.c') diff --git a/cont.c b/cont.c index 3b05f995d4..670aef0ec2 100644 --- a/cont.c +++ b/cont.c @@ -510,6 +510,7 @@ cont_capture(volatile int *stat) if (ruby_setjmp(cont->jmpbuf)) { volatile VALUE value; + VAR_INITIALIZED(cont); value = cont->value; if (cont->argc == -1) rb_exc_raise(value); cont->value = Qnil; @@ -1271,15 +1272,14 @@ rb_fiber_start(void) { rb_thread_t *th = GET_THREAD(); rb_fiber_t *fib; - rb_context_t *cont; rb_proc_t *proc; int state; GetFiberPtr(th->fiber, fib); - cont = &fib->cont; TH_PUSH_TAG(th); if ((state = EXEC_TAG()) == 0) { + rb_context_t *cont = &VAR_FROM_MEMORY(fib)->cont; int argc; const VALUE *argv, args = cont->value; GetProcPtr(cont->saved_thread.first_proc, proc); -- cgit v1.2.3