From: Arnaud Giersch Date: Sun, 22 Nov 2020 14:14:02 +0000 (+0100) Subject: Use ssize_t. X-Git-Tag: v3.26~146 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/eb3793731d1cf78189d20daeb5fdf0e97a4bb587 Use ssize_t. --- diff --git a/src/smpi/internals/smpi_global.cpp b/src/smpi/internals/smpi_global.cpp index ba46a4b432..a8798fd5d2 100644 --- a/src/smpi/internals/smpi_global.cpp +++ b/src/smpi/internals/smpi_global.cpp @@ -379,13 +379,13 @@ static void smpi_copy_file(const std::string& src, const std::string& target, of #endif // If this point is reached, sendfile() actually is not available. Copy file by hand. std::vector buf(1024 * 1024 * 4); - while (int got = read(fdin, buf.data(), buf.size())) { + while (ssize_t got = read(fdin, buf.data(), buf.size())) { if (got == -1) { xbt_assert(errno == EINTR, "Cannot read from %s", src.c_str()); } else { const unsigned char* p = buf.data(); - int todo = got; - while (int done = write(fdout, p, todo)) { + ssize_t todo = got; + while (ssize_t done = write(fdout, p, todo)) { if (done == -1) { xbt_assert(errno == EINTR, "Cannot write into %s", target.c_str()); } else {