Skip to content

Commit 7f9300d

Browse files
Replace %tu with %lu for NSUInteger formatting
1 parent 2eb1b65 commit 7f9300d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/cpp/src/generate/t_cocoa_generator.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1522,17 +1522,17 @@ namespace {
15221522

15231523
virtual void visitList(t_list *type) {
15241524
string typeName = get_thrift_name(type);
1525-
result = "[NSString stringWithFormat:@\"" + typeName + "(size=%tu)\", [" + fieldName + " count]]";
1525+
result = "[NSString stringWithFormat:@\"" + typeName + "(size=%lu)\", (unsigned long) [" + fieldName + " count]]";
15261526
}
15271527

15281528
virtual void visitSet(t_set *type) {
15291529
string typeName = get_thrift_name(type);
1530-
result = "[NSString stringWithFormat:@\"" + typeName + "(size=%tu)\", [" + fieldName + " count]]";
1530+
result = "[NSString stringWithFormat:@\"" + typeName + "(size=%lu)\", (unsigned long) [" + fieldName + " count]]";
15311531
}
15321532

15331533
virtual void visitMap(t_map *type) {
15341534
string typeName = get_thrift_name(type);
1535-
result = "[NSString stringWithFormat:@\"" + typeName + "(size=%tu)\", [" + fieldName + " count]]";
1535+
result = "[NSString stringWithFormat:@\"" + typeName + "(size=%lu)\", (unsigned long) [" + fieldName + " count]]";
15361536
}
15371537

15381538
virtual void visitStruct(t_struct *) {

0 commit comments

Comments
 (0)