Silence "uninitialized" warnings

This commit is contained in:
Jonas Kulla 2014-10-01 06:29:20 +02:00
parent fa911b8018
commit 7b65977eb9
2 changed files with 2 additions and 2 deletions

View File

@ -349,7 +349,7 @@ rb_check_argc(int actual, int expected)
{ \
RB_UNUSED_PARAM; \
Klass *k = getPrivateData<Klass>(self); \
type value; \
type value = 0; \
GUARD_EXC( value = k->get##PropName(); ) \
return value_fun(value); \
} \

View File

@ -195,7 +195,7 @@ defineClass(mrb_state *mrb, const char *name)
MRB_METHOD(Klass##Get##PropName) \
{ \
Klass *k = getPrivateData<Klass>(mrb, self); \
mrb_type value; \
mrb_type value = 0; \
GUARD_EXC( value = k->get##PropName(); ) \
return mrb_##conv_t##_value(value); \
} \