summaryrefslogtreecommitdiff
path: root/cont.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-04 08:34:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-04 08:34:12 +0000
commite18259424ea6f1baafacab442d57c05d51c2548b (patch)
treee054a11ce590506a78cb7083e82d7859a2df92a5 /cont.c
parent9dd0113023283583441fc4f3cc571c275ec5ec0b (diff)
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
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cont.c b/cont.c
index 3b05f99..670aef0 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);