From f16fae57b301633faf099cc0e5c78413fd4ed057 Mon Sep 17 00:00:00 2001 From: Alex Helfet Date: Wed, 22 Mar 2017 06:48:58 +0000 Subject: [PATCH] Fix GCC warnings in initializers for capn_val0 and capn_seg. --- 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 75b3e43..4258f0a 100644 --- a/compiler/capnpc-c.c +++ b/compiler/capnpc-c.c @@ -1348,7 +1348,7 @@ int main() { fprintf(srcf, "/* AUTO GENERATED - DO NOT EDIT */\n"); if (g_val0used) - fprintf(srcf, "static const capn_text capn_val0 = {0,\"\"};\n"); + fprintf(srcf, "static const capn_text capn_val0 = {0,\"\",0};\n"); if (g_nullused) fprintf(srcf, "static const capn_ptr capn_null = {CAPN_NULL};\n"); @@ -1364,7 +1364,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};\n", + fprintf(srcf, "static const struct capn_segment capn_seg = {{0},0,0,0,(char*)&capn_buf[0],%lu,%lu,0};\n", g_valseg.len-8, g_valseg.len-8); }