From 68c70b5884eea86e591a3864973a5474d427dfef Mon Sep 17 00:00:00 2001 From: Christopher Di Bella Date: Thu, 25 Feb 2021 02:20:17 +0000 Subject: [PATCH] follows the advice of -Wsign-compare Bug: 181177782 Test: None Change-Id: I6c53a243639d6b086dc676995d83286d034d1083 --- fs_mgr/tools/dmuserd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs_mgr/tools/dmuserd.cpp b/fs_mgr/tools/dmuserd.cpp index e50a4a281..6b68b2871 100644 --- a/fs_mgr/tools/dmuserd.cpp +++ b/fs_mgr/tools/dmuserd.cpp @@ -81,7 +81,7 @@ ssize_t write_all(int fd, void* buf, size_t len) { ssize_t total = 0; ssize_t once; - while (total < len) { + while (total < static_cast(len)) { once = write(fd, buf_c + total, len - total); if (once < 0) return once; if (once == 0) { @@ -99,7 +99,7 @@ ssize_t read_all(int fd, void* buf, size_t len) { ssize_t total = 0; ssize_t once; - while (total < len) { + while (total < static_cast(len)) { once = read(fd, buf_c + total, len - total); if (once < 0) return once; if (once == 0) {