diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-31 12:24:28 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-31 12:24:28 +0000 |
commit | e00ac16763a74db7a7bc3a0da4129c9f32029c98 (patch) | |
tree | 1dcc397846ae7ec8b721f3f62bee2411eedb025b | |
parent | f84ef81dad3c028fd0935605f56743d361074774 (diff) | |
download | ruby-e00ac16763a74db7a7bc3a0da4129c9f32029c98.tar.gz |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | configure.in | 1 | ||||
-rw-r--r-- | thread.c | 2 |
3 files changed, 15 insertions, 1 deletions
@@ -1,3 +1,16 @@ +Sat May 31 21:15:43 2014 URABE Shyouhei <shyouhei@ruby-lang.org> + + * 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 <shibata.hiroshi@gmail.com> * 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)]) @@ -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; |