From 1ca03dc4f77de4030534596ad23af64be925dc44 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 8 Jun 2019 19:46:32 +0900 Subject: Suppress warnings by gcc 9.1 --- io.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index cec16ea5b7..893cabc248 100644 --- a/io.c +++ b/io.c @@ -10972,6 +10972,7 @@ static int nogvl_fcopyfile(struct copy_stream_struct *stp) { off_t cur, ss = 0; + const off_t src_offset = stp->src_offset; int ret; if (stp->copy_length >= (off_t)0) { @@ -10987,7 +10988,7 @@ nogvl_fcopyfile(struct copy_stream_struct *stp) if (lseek(stp->dst_fd, 0, SEEK_CUR) > (off_t)0) /* if dst IO was already written */ return 0; - if (stp->src_offset > (off_t)0) { + if (src_offset > (off_t)0) { off_t r; /* get current offset */ @@ -10999,7 +11000,7 @@ nogvl_fcopyfile(struct copy_stream_struct *stp) } errno = 0; - r = lseek(stp->src_fd, stp->src_offset, SEEK_SET); + r = lseek(stp->src_fd, src_offset, SEEK_SET); if (r < (off_t)0 && errno) { stp->error_no = errno; return 1; @@ -11012,7 +11013,7 @@ nogvl_fcopyfile(struct copy_stream_struct *stp) if (ret == 0) { /* success */ stp->total = ss; - if (stp->src_offset > (off_t)0) { + if (src_offset > (off_t)0) { off_t r; errno = 0; /* reset offset */ -- cgit v1.2.3