Received: from eggs.gnu.org ([2001:4830:134:3::10]:49667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSkxh-0006WC-79 for qemu-devel@nongnu.org; Sun, 06 Oct 2013 05:49:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VSkxa-0006Q4-Ef for qemu-devel@nongnu.org; Sun, 06 Oct 2013 05:49:17 -0400 From: Michael Tokarev Date: Sun, 6 Oct 2013 13:32:58 +0400 Message-Id: <1381051979-25742-14-git-send-email-mjt@msgid.tls.msk.ru> In-Reply-To: <1381051979-25742-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1381051979-25742-1-git-send-email-mjt@msgid.tls.msk.ru> Subject: [Qemu-devel] [PULL 13/14] util/path: Fix type which is longer than 8 bit for MinGW List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: qemu-trivial@nongnu.org, Stefan Weil , Michael Tokarev , qemu-devel@nongnu.org From: Stefan Weil While dirent->d_type is 8 bit for most systems, it is 32 bit for MinGW. Reducing it to 8 bit results in a compiler warning because the macro is_dir_maybe compares that 8 bit value with 32 bit constants. Using 'unsigned' instead of 'unsigned char' matches the declaration for MinGW and does not harm the other systems. MinGW-w64 is not affected: it does not declare d_type. Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- util/path.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/path.c b/util/path.c index f0c6962..623219e 100644 --- a/util/path.c +++ b/util/path.c @@ -39,7 +39,7 @@ static int strneq(const char *s1, unsigned int n, const char *s2) } static struct pathelem *add_entry(struct pathelem *root, const char *name, - unsigned char type); + unsigned type); static struct pathelem *new_entry(const char *root, struct pathelem *parent, @@ -82,7 +82,7 @@ static struct pathelem *add_dir_maybe(struct pathelem *path) } static struct pathelem *add_entry(struct pathelem *root, const char *name, - unsigned char type) + unsigned type) { struct pathelem **e; -- 1.7.10.4