Commit 5e6869e7 authored by Cody P Schafer's avatar Cody P Schafer Committed by David Gibson

bytestring: avoid compile_fail failure due to uninitialized warning

bytestring: Module tests compile (tests_compile): FAIL
/home/x/g/ccc/ccan/ccan/bytestring/test/compile_fail-BYTESTRING-2.c:Compile gave warnings without -DFAIL:
/home/x/g/ccc/ccan/ccan/bytestring/test/compile_fail-BYTESTRING-2.c: In function ‘main’:
/home/x/g/ccc/ccan/ccan/bytestring/test/compile_fail-BYTESTRING-2.c:15:2: warning: ‘bs.len’ is used uninitialized in this function [-Wuninitialized]
  printf("%zd %s\n", bs.len, x);
  ^
Signed-off-by: default avatarCody P Schafer <dev@codyps.com>
Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
parent 426bd7e6
......@@ -11,6 +11,8 @@ int main(int argc, char *argv[])
#ifdef FAIL
bs = BYTESTRING(x);
#else
bs.len = 0;
#endif
printf("%zd %s\n", bs.len, x);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment