From: NAKAMURA Takumi Date: Fri, 25 Jan 2013 10:01:35 +0000 (+0000) Subject: ConvertUTF.h: Suppress a warning with ptrdiff_t on i686. [-Wsign-compare] X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae04222bc5143756c45c399cc8e504c8b12dc6fc;p=clang ConvertUTF.h: Suppress a warning with ptrdiff_t on i686. [-Wsign-compare] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173436 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/ConvertUTF.h b/include/clang/Basic/ConvertUTF.h index 2d13d2c2b9..7e04a12a4b 100644 --- a/include/clang/Basic/ConvertUTF.h +++ b/include/clang/Basic/ConvertUTF.h @@ -217,7 +217,7 @@ static inline ConversionResult convertUTF8Sequence(const UTF8 **source, if (*source == sourceEnd) return sourceExhausted; unsigned size = getNumBytesForUTF8(**source); - if (size > sourceEnd - *source) + if ((ptrdiff_t)size > sourceEnd - *source) return sourceExhausted; return ConvertUTF8toUTF32(source, *source + size, &target, target + 1, flags); }