From 134cf4dd15d74b08cf80c4ce82939c7276083196 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 3 Mar 2015 14:15:51 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20warning=20'conversion=20to=20=E2=80=98lon?= =?UTF-8?q?g=20unsigned=20int=E2=80=99=20from=20=E2=80=98WriteResult?= =?UTF-8?q?=E2=80=99=20may=20change=20the=20sign=20of=20the=20result=20[-W?= =?UTF-8?q?sign-conversion]'.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89284 --- tools/tool-common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/tool-common.c b/tools/tool-common.c index ee5099d..16c7956 100644 --- a/tools/tool-common.c +++ b/tools/tool-common.c @@ -80,9 +80,9 @@ tool_write_all (int fd, while (size > bytes_written) { - WriteResult this_time = write (fd, p, size - bytes_written); + WriteResult res = write (fd, p, size - bytes_written); - if (this_time < 0) + if (res < 0) { if (errno == EINTR) continue; @@ -90,6 +90,7 @@ tool_write_all (int fd, return FALSE; } + size_t this_time = (size_t) res; p += this_time; bytes_written += this_time; } -- 1.8.4.5