From 568c86a48955fd5479db53b68d59be04df633ec5 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 1 May 2014 16:49:55 -0700 Subject: [PATCH] Fix wchar.cpp signed/unsigned comparison build failure. Change-Id: Id20b91f3d57c4430987b5cc88ac99c245801d73b --- libc/bionic/wchar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libc/bionic/wchar.cpp b/libc/bionic/wchar.cpp index 0ec9504a2..8ffdb9c53 100644 --- a/libc/bionic/wchar.cpp +++ b/libc/bionic/wchar.cpp @@ -72,7 +72,7 @@ size_t mbrtowc(wchar_t* pwc, const char* s, size_t n, mbstate_t*) { // from the first octet, and a mask that extracts the // interesting bits of the first octet. We already know // the character is at least two bytes long. - int length; + size_t length; int mask; // We also specify a lower bound for the character code to @@ -108,7 +108,7 @@ size_t mbrtowc(wchar_t* pwc, const char* s, size_t n, mbstate_t*) { // Decode the octet sequence representing the character in chunks // of 6 bits, most significant first. wchar_t wch = static_cast(*s++) & mask; - int i; + size_t i; for (i = 1; i < MIN(length, n); i++) { if ((*s & 0xc0) != 0x80) { // Malformed input; bad characters in the middle of a character.