Skip to content

Commit 32d15d8

Browse files
authored
Merge pull request #11052 from compnerd/printf-conversion-specifier
2 parents 86e5f32 + 21a27b0 commit 32d15d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stdlib/public/runtime/Reflection.mm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "WeakReference.h"
2525
#include "llvm/Support/Compiler.h"
2626
#include <cassert>
27+
#include <cinttypes>
2728
#include <cstdio>
2829
#include <cstring>
2930
#include <new>
@@ -382,7 +383,7 @@ void swift_TupleMirror_subscript(String *outString,
382383
if (!hasLabel) {
383384
// The name is the stringized element number '.0'.
384385
char buf[32];
385-
snprintf(buf, sizeof(buf), ".%zd", i);
386+
snprintf(buf, sizeof(buf), ".%" PRIdPTR, i);
386387
new (outString) String(buf, strlen(buf));
387388
}
388389

0 commit comments

Comments
 (0)