From 9d05b9a4b34862c7c9db80b5c3b3ed88bb526733 Mon Sep 17 00:00:00 2001 From: aamine Date: Mon, 23 Jun 2003 14:55:09 +0000 Subject: [PATCH] * io.c (io_close): missing prototype. * ext/socket/socket.c (bsock_do_not_rev_lookup_set): ditto. * ext/win32ole/win32ole.c (foletype_guid, foletype_progid): ditto. * error.c (syserr_initialize): length argument of sprintf() is an int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 11 +++++++++++ error.c | 2 +- ext/socket/socket.c | 1 + ext/win32ole/win32ole.c | 2 ++ io.c | 1 + 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 341277d1b4..cbe29c617c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Mon Jun 23 23:59:56 2003 Minero Aoki + + * io.c (io_close): missing prototype. + + * ext/socket/socket.c (bsock_do_not_rev_lookup_set): ditto. + + * ext/win32ole/win32ole.c (foletype_guid, foletype_progid): ditto. + + * error.c (syserr_initialize): length argument of sprintf() is an + int. + Mon Jun 23 23:28:14 2003 WATANABE Hirofumi * MANIFEST: add wince files. diff --git a/error.c b/error.c index f62150f3e5..901d0f0273 100644 --- a/error.c +++ b/error.c @@ -582,7 +582,7 @@ syserr_initialize(argc, argv, self) if (!NIL_P(mesg)) { StringValue(mesg); buf = ALLOCA_N(char, strlen(err)+RSTRING(mesg)->len+4); - sprintf(buf, "%s - %.*s", err, RSTRING(mesg)->len, RSTRING(mesg)->ptr); + sprintf(buf, "%s - %.*s", err, (int)RSTRING(mesg)->len, RSTRING(mesg)->ptr); mesg = rb_str_new2(buf); } else { diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 0198a8e1d6..87ca9b874a 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -484,6 +484,7 @@ bsock_do_not_rev_lookup() static VALUE bsock_do_not_rev_lookup_set(self, val) + VALUE self, val; { rb_secure(4); do_not_reverse_lookup = RTEST(val); diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index c738063aa8..b8b5bcf471 100644 --- a/ext/win32ole/win32ole.c +++ b/ext/win32ole/win32ole.c @@ -3190,6 +3190,7 @@ ole_type_guid(pTypeInfo) */ static VALUE foletype_guid(self) + VALUE self; { struct oletypedata *ptype; Data_Get_Struct(self, struct oletypedata, ptype); @@ -3221,6 +3222,7 @@ ole_type_progid(pTypeInfo) */ static VALUE foletype_progid(self) + VALUE self; { struct oletypedata *ptype; Data_Get_Struct(self, struct oletypedata, ptype); diff --git a/io.c b/io.c index 1377df4b51..956d698511 100644 --- a/io.c +++ b/io.c @@ -1424,6 +1424,7 @@ rb_io_close_m(io) static VALUE io_close(io) + VALUE io; { return rb_funcall(io, rb_intern("close"), 0, 0); }