From: Martin Wilck Subject: [PATCH 54/72] libmpathcmd: fix -Wsign-compare warnings Date: Sat, 12 Oct 2019 21:28:44 +0000 Message-ID: <20191012212703.12989-55-martin.wilck@suse.com> References: <20191012212703.12989-1-martin.wilck@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20191012212703.12989-1-martin.wilck@suse.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Christophe Varoqui , Benjamin Marzinski Cc: "dm-devel@redhat.com" , Martin Wilck List-Id: dm-devel.ids From: Martin Wilck Signed-off-by: Martin Wilck --- libmpathcmd/mpath_cmd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libmpathcmd/mpath_cmd.c b/libmpathcmd/mpath_cmd.c index f00bf7e1..60b2d965 100644 --- a/libmpathcmd/mpath_cmd.c +++ b/libmpathcmd/mpath_cmd.c @@ -96,7 +96,8 @@ static size_t write_all(int fd, const void *buf, size_t len) */ int __mpath_connect(int nonblocking) { - int fd, len; + int fd; + size_t len; struct sockaddr_un addr; int flags = 0; @@ -172,7 +173,7 @@ int mpath_recv_reply_data(int fd, char *reply, size_t len, ret = read_all(fd, reply, len, timeout); if (ret < 0) return ret; - if (ret != len) { + if ((size_t)ret != len) { errno = EIO; return -1; } -- 2.23.0