Skip to content

Commit 011eb22

Browse files
opoplawskiJens-G
authored andcommittedFeb 17, 2021
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
1 parent d446f02 commit 011eb22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎compiler/cpp/src/thrift/generate/t_delphi_generator.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ std::string t_delphi_generator::make_pascal_string_literal(std::string value) {
10621062
}
10631063

10641064
result << "'";
1065-
for (char const &c: value) {
1065+
for (signed char const c: value) {
10661066
if( (c >= 0) && (c < 32)) { // convert ctrl chars, but leave UTF-8 alone
10671067
result << "#" << (int)c;
10681068
} else if (c == '\'') {

0 commit comments

Comments
 (0)
Please sign in to comment.