ruby-changes:53879
From: normal <ko1@a...>
Date: Fri, 30 Nov 2018 08:28:21 +0900 (JST)
Subject: [ruby-changes:53879] normal:r66098 (trunk): io.c: fix clang -Werror, -Wshorten-64-to-32 errors
normal 2018-11-30 08:28:15 +0900 (Fri, 30 Nov 2018) New Revision: 66098 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66098 Log: io.c: fix clang -Werror,-Wshorten-64-to-32 errors Modified files: trunk/io.c Index: io.c =================================================================== --- io.c (revision 66097) +++ io.c (revision 66098) @@ -6456,7 +6456,7 @@ linux_get_maxfd(void) https://github.com/ruby/ruby/blob/trunk/io.c#L6456 err: close(fd); - return ss; + return (int)ss; } #endif @@ -10894,7 +10894,7 @@ nogvl_copy_file_range(struct copy_stream https://github.com/ruby/ruby/blob/trunk/io.c#L10894 if (current_offset < (off_t)0 && errno) { stp->syserr = "lseek"; stp->error_no = errno; - return current_offset; + return (int)current_offset; } copy_length = src_size - current_offset; } @@ -10955,7 +10955,7 @@ nogvl_copy_file_range(struct copy_stream https://github.com/ruby/ruby/blob/trunk/io.c#L10955 } stp->syserr = "copy_file_range"; stp->error_no = errno; - return ss; + return (int)ss; } return 1; } @@ -11055,7 +11055,7 @@ nogvl_copy_stream_sendfile(struct copy_s https://github.com/ruby/ruby/blob/trunk/io.c#L11055 if (cur < (off_t)0 && errno) { stp->syserr = "lseek"; stp->error_no = errno; - return cur; + return (int)cur; } copy_length = src_size - cur; } @@ -11190,7 +11190,7 @@ nogvl_copy_stream_write(struct copy_stre https://github.com/ruby/ruby/blob/trunk/io.c#L11190 } stp->syserr = "write"; stp->error_no = errno; - return ss; + return (int)ss; } off += (int)ss; len -= (int)ss; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/