aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-07-14 13:49:39 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-07-14 13:49:39 +0900
commit315d3adf0f9660568bdca01fd6ddd196c92973d2 (patch)
treec9ef5a37ff5efc136cf030f27bf121b5d59bc801 /io.c
parent18603e9046c0baa23560268e16ead6bbc27726c2 (diff)
downloadruby-315d3adf0f9660568bdca01fd6ddd196c92973d2.tar.gz
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.
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 3e3a0ed448..e4d9f3c4ec 100644
--- a/io.c
+++ b/io.c
@@ -7275,7 +7275,7 @@ io_reopen(VALUE io, VALUE nfile)
rb_sys_fail(0);
}
else {
- io_tell(fptr);
+ flush_before_seek(fptr);
}
if (orig->mode & FMODE_READABLE) {
pos = io_tell(orig);