summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrion Poplawski <orion@nwra.com>2021-02-17 07:52:49 -0700
committerJens Geyer <jensg@apache.org>2021-02-17 19:53:04 +0100
commit011eb22e32eea4a3220dcea6fd63f608e682ba2c (patch)
treee675c25cda54fcf9a85beaa989677cedd4f215f2
parentd446f0248f68216ec1ef9bfcc23e634d15cc6e38 (diff)
downloadthrift-011eb22e32eea4a3220dcea6fd63f608e682ba2c.tar.gz
THRIFT-5350 char is unsigned on non-x86 arches, use signed char to avoid compiler warning about always true comparisons
Patch: Orion Poplawski This closes #2331
-rw-r--r--compiler/cpp/src/thrift/generate/t_delphi_generator.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/cpp/src/thrift/generate/t_delphi_generator.cc b/compiler/cpp/src/thrift/generate/t_delphi_generator.cc
index d3ad76a32..eac46a6c7 100644
--- a/compiler/cpp/src/thrift/generate/t_delphi_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_delphi_generator.cc
@@ -1062,7 +1062,7 @@ std::string t_delphi_generator::make_pascal_string_literal(std::string value) {
}
result << "'";
- for (char const &c: value) {
+ for (signed char const c: value) {
if( (c >= 0) && (c < 32)) { // convert ctrl chars, but leave UTF-8 alone
result << "#" << (int)c;
} else if (c == '\'') {