From 0aa0d3d633e46de5c85343aae213d3a8531f61a8 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 21 Apr 2012 10:51:42 +0000 Subject: [PATCH] YAMLParser: silence warning about tautological comparison on unsigned-char platforms. No functionality change. llvm-svn: 155280 --- llvm/lib/Support/YAMLParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Support/YAMLParser.cpp b/llvm/lib/Support/YAMLParser.cpp index 330519f3019d..9b5896de7aa1 100644 --- a/llvm/lib/Support/YAMLParser.cpp +++ b/llvm/lib/Support/YAMLParser.cpp @@ -658,7 +658,7 @@ std::string yaml::escape(StringRef Input) { EscapedInput += "\\r"; else if (*i == 0x1B) EscapedInput += "\\e"; - else if (*i >= 0 && *i < 0x20) { // Control characters not handled above. + else if ((unsigned char)*i < 0x20) { // Control characters not handled above. std::string HexStr = utohexstr(*i); EscapedInput += "\\x" + std::string(2 - HexStr.size(), '0') + HexStr; } else if (*i & 0x80) { // UTF-8 multiple code unit subsequence.