diff --git a/ChangeLog b/ChangeLog index 7f8d338b84..8381daa200 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +Sat May 31 21:15:43 2014 URABE Shyouhei + + * thread.c (rb_thread_atfork_internal): My compiler complains + about this variable being used before initialized. I looked at + the code and expanded the macro and turned out it was actually + USED for pointer arithmetic, not dereferenced. So this was + never a serious bug. But is annoying indeed to see warnings + every time. I added `=0` and all went healthy. + + * configure.in: Also, I found that the problematic macro expansion + only happens when we lack __typeof__ C extension, which shall + not be the case of my compiler. I added AC_CTYPEOF to kick ass. + Sat May 31 16:32:50 2014 SHIBATA Hiroshi * lib/ipaddr.rb: extracted inline tests into test dir. diff --git a/configure.in b/configure.in index 97f777972a..11b0f1f58c 100644 --- a/configure.in +++ b/configure.in @@ -1188,6 +1188,7 @@ AC_C_CONST AC_C_CHAR_UNSIGNED AC_C_INLINE AC_C_VOLATILE +AC_C_TYPEOF AS_CASE(":$ac_cv_c_const:$ac_cv_c_volatile:", [*:no:*], [AC_MSG_ERROR(ANSI C-conforming const and volatile are mandatory)]) diff --git a/thread.c b/thread.c index e4166b5b95..07d65aaf7f 100644 --- a/thread.c +++ b/thread.c @@ -3770,7 +3770,7 @@ static void rb_thread_atfork_internal(void (*atfork)(rb_thread_t *, const rb_thread_t *)) { rb_thread_t *th = GET_THREAD(); - rb_thread_t *i; + rb_thread_t *i = 0; rb_vm_t *vm = th->vm; vm->main_thread = th;