ruby-changes:56445
From: Yusuke <ko1@a...>
Date: Sun, 14 Jul 2019 13:58:00 +0900 (JST)
Subject: [ruby-changes:56445] Yusuke Endoh: 315d3adf0f (master): Avoid io_tell whose return value is not used
https://git.ruby-lang.org/ruby.git/commit/?id=315d3adf0f From 315d3adf0f9660568bdca01fd6ddd196c92973d2 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Sun, 14 Jul 2019 13:49:39 +0900 Subject: Avoid io_tell whose return value is not used In this case, flush_before_seek is enough. This change will suppress a warning of Coverity Scan. diff --git a/io.c b/io.c index 3e3a0ed..e4d9f3c 100644 --- a/io.c +++ b/io.c @@ -7275,7 +7275,7 @@ io_reopen(VALUE io, VALUE nfile) https://github.com/ruby/ruby/blob/trunk/io.c#L7275 rb_sys_fail(0); } else { - io_tell(fptr); + flush_before_seek(fptr); } if (orig->mode & FMODE_READABLE) { pos = io_tell(orig); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/