* io.c (rb_io_initialize, argf_each_line, argf_each_byte): suppress
warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fc5885aa7a
commit
ad1e42421c
@ -1,3 +1,8 @@
|
|||||||
|
Wed Aug 15 14:59:21 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* io.c (rb_io_initialize, argf_each_line, argf_each_byte): suppress
|
||||||
|
warnings.
|
||||||
|
|
||||||
Wed Aug 15 14:22:05 2007 Koichi Sasada <ko1@atdot.net>
|
Wed Aug 15 14:22:05 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* parse.y: remove "//" type comment.
|
* parse.y: remove "//" type comment.
|
||||||
|
8
io.c
8
io.c
@ -4157,7 +4157,7 @@ rb_io_initialize(int argc, VALUE *argv, VALUE io)
|
|||||||
{
|
{
|
||||||
VALUE fnum, mode, orig;
|
VALUE fnum, mode, orig;
|
||||||
rb_io_t *fp, *ofp = NULL;
|
rb_io_t *fp, *ofp = NULL;
|
||||||
int fd, flags, fmode;
|
int fd, fmode, flags = O_RDONLY;
|
||||||
|
|
||||||
rb_secure(4);
|
rb_secure(4);
|
||||||
rb_scan_args(argc, argv, "11", &fnum, &mode);
|
rb_scan_args(argc, argv, "11", &fnum, &mode);
|
||||||
@ -4177,8 +4177,6 @@ rb_io_initialize(int argc, VALUE *argv, VALUE io)
|
|||||||
#if defined(HAVE_FCNTL) && defined(F_GETFL)
|
#if defined(HAVE_FCNTL) && defined(F_GETFL)
|
||||||
flags = fcntl(fd, F_GETFL);
|
flags = fcntl(fd, F_GETFL);
|
||||||
if (flags == -1) rb_sys_fail(0);
|
if (flags == -1) rb_sys_fail(0);
|
||||||
#else
|
|
||||||
flags = O_RDONLY;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
MakeOpenFile(io, fp);
|
MakeOpenFile(io, fp);
|
||||||
@ -5468,8 +5466,6 @@ argf_readchar(void)
|
|||||||
static VALUE
|
static VALUE
|
||||||
argf_each_line(int argc, VALUE *argv, VALUE self)
|
argf_each_line(int argc, VALUE *argv, VALUE self)
|
||||||
{
|
{
|
||||||
VALUE str;
|
|
||||||
|
|
||||||
RETURN_ENUMERATOR(self, argc, argv);
|
RETURN_ENUMERATOR(self, argc, argv);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (!next_argv()) return Qnil;
|
if (!next_argv()) return Qnil;
|
||||||
@ -5482,8 +5478,6 @@ argf_each_line(int argc, VALUE *argv, VALUE self)
|
|||||||
static VALUE
|
static VALUE
|
||||||
argf_each_byte(VALUE self)
|
argf_each_byte(VALUE self)
|
||||||
{
|
{
|
||||||
VALUE byte;
|
|
||||||
|
|
||||||
RETURN_ENUMERATOR(self, 0, 0);
|
RETURN_ENUMERATOR(self, 0, 0);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (!next_argv()) return Qnil;
|
if (!next_argv()) return Qnil;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user