From 704a34fa6599d3974220eebd8b0dc7562f6adbd0 Mon Sep 17 00:00:00 2001 From: Alexis Ballier Date: Tue, 2 Aug 2016 15:35:28 +0200 Subject: [PATCH] Use proper format specifiers for size_t. --- compiler/capnpc-c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/capnpc-c.c b/compiler/capnpc-c.c index 6b976c6..8499e0d 100644 --- a/compiler/capnpc-c.c +++ b/compiler/capnpc-c.c @@ -1378,7 +1378,7 @@ int main() { if (g_valseg.len > 8) { size_t k; - fprintf(srcf, "static const uint8_t capn_buf[%lu] = {", g_valseg.len-8); + fprintf(srcf, "static const uint8_t capn_buf[%zu] = {", g_valseg.len-8); for (k = 8; k < g_valseg.len; k++) { if (k > 8) fprintf(srcf, ","); @@ -1388,7 +1388,7 @@ int main() { } fprintf(srcf, "\n};\n"); - fprintf(srcf, "static const struct capn_segment capn_seg = {{0},0,0,0,(char*)&capn_buf[0],%lu,%lu,0};\n", + fprintf(srcf, "static const struct capn_segment capn_seg = {{0},0,0,0,(char*)&capn_buf[0],%zu,%zu,0};\n", g_valseg.len-8, g_valseg.len-8); }