From: "U.Nakamura" Date: 2001-05-03T19:38:11+09:00 Subject: [ruby-dev:13098] Re: [PATCH] ruby 1.7 compile error on mswin32 こんにちは、なかむら(う)です。 At Thu, 3 May 2001 15:03:46 +0900, matz@zetabits.com (Yukihiro Matsumoto) wrote in '[ruby-dev:13090] Re: [PATCH] ruby 1.7 compile error on mswin32' > |# この他にもコンパイル時警告が山のように... ;_; > お手数かけますが、報告してくださいませ。 それでは、とりあえず下記のようにすれば警告は消えます。 関数の宣言のほうをきつめにしましたけど、逆のほうがいいの かも。 diff -u2pr current/dir.c mytree/dir.c --- current/dir.c Wed May 2 23:28:34 2001 +++ mytree/dir.c Thu May 3 19:23:18 2001 @@ -751,5 +751,5 @@ void rb_glob(path, func, arg) char *path; - void (*func)(); + void (*func)(const char*, VALUE); VALUE arg; { @@ -766,7 +766,9 @@ rb_globi(path, func, arg) } +static void push_pattern(const char *path, VALUE ary); + static void push_pattern(path, ary) - char *path; + const char *path; VALUE ary; { diff -u2pr current/eval.c mytree/eval.c --- current/eval.c Wed May 2 23:28:34 2001 +++ mytree/eval.c Thu May 3 19:27:10 2001 @@ -3930,5 +3930,5 @@ rb_rescue(b_proc, data1, r_proc, data2) VALUE rb_protect(proc, data, state) - VALUE (*proc)(); + VALUE (*proc)(VALUE); VALUE data; int *state; @@ -5732,5 +5732,5 @@ static struct end_proc_data *end_procs, void rb_set_end_proc(func, data) - void (*func)(); + void (*func)(VALUE); VALUE data; { @@ -5763,4 +5763,6 @@ rb_mark_end_proc() } +static void call_end_proc(VALUE data); + static void call_end_proc(data) @@ -5805,5 +5807,5 @@ rb_exec_end_proc() link = end_procs; while (link) { - rb_protect((VALUE(*)())link->func, link->data, &status); + rb_protect((VALUE(*)(VALUE))link->func, link->data, &status); if (status) { error_handle(status); @@ -5814,5 +5816,5 @@ rb_exec_end_proc() link = ephemeral_end_procs; ephemeral_end_procs = link->next; - rb_protect((VALUE(*)())link->func, link->data, &status); + rb_protect((VALUE(*)(VALUE))link->func, link->data, &status); if (status) { error_handle(status); diff -u2pr current/ext/socket/socket.c mytree/ext/socket/socket.c --- current/ext/socket/socket.c Thu Mar 22 06:20:18 2001 +++ mytree/ext/socket/socket.c Thu May 3 19:31:14 2001 @@ -156,4 +156,6 @@ rb_getaddrinfo(nodename, servname, hints #ifdef NT +static void sock_finalize(OpenFile *fptr); + static void sock_finalize(fptr) diff -u2pr current/intern.h mytree/intern.h --- current/intern.h Wed May 2 23:28:34 2001 +++ mytree/intern.h Thu May 3 19:25:40 2001 @@ -48,5 +48,5 @@ VALUE rb_ary_assoc _((VALUE, VALUE)); VALUE rb_ary_rassoc _((VALUE, VALUE)); VALUE rb_ary_includes _((VALUE, VALUE)); -VALUE rb_protect_inspect _((VALUE(*)(VALUE,VALUE),VALUE,VALUE)); +VALUE rb_protect_inspect _((VALUE(*)(),VALUE,VALUE)); VALUE rb_inspecting_p _((VALUE)); /* bignum.c */ @@ -145,5 +145,5 @@ VALUE rb_class_new_instance _((int, VALU VALUE rb_f_lambda _((void)); VALUE rb_protect _((VALUE (*)(VALUE), VALUE, int*)); -void rb_set_end_proc _((void (*)(void), VALUE)); +void rb_set_end_proc _((void (*)(VALUE), VALUE)); void rb_mark_end_proc _((void)); void rb_exec_end_proc _((void)); diff -u2pr current/io.c mytree/io.c --- current/io.c Wed May 2 23:28:34 2001 +++ mytree/io.c Thu May 3 19:27:40 2001 @@ -1532,4 +1532,6 @@ pipe_atexit _((void)) #endif +static void pipe_finalize(OpenFile *fptr); + static void pipe_finalize(fptr) diff -u2pr current/win32/win32.c mytree/win32/win32.c --- current/win32/win32.c Sat Apr 14 13:23:54 2001 +++ mytree/win32/win32.c Thu May 3 19:29:20 2001 @@ -2826,5 +2826,5 @@ static void win32_call_handler(struct ha { int status; - RUBY_CRITICAL(rb_protect((VALUE (*)())h->handler, (VALUE)h->arg, &h->status); + RUBY_CRITICAL(rb_protect((VALUE (*)(VALUE))h->handler, (VALUE)h->arg, &h->status); status = h->status; SetEvent(h->handshake)); それでは。 -- U.Nakamura