spv.c: Avoid warnings about uninitialised variables
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 20 Jun 2020 05:17:06 +0000 (07:17 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 20 Jun 2020 05:17:03 +0000 (07:17 +0200)
src/output/spv/spv.c

index b82b7693ed2718515f38a2915f5944aa71ddd768..83fba9631cc9287f2e3d3cb5b1de99f4493f17fe 100644 (file)
@@ -605,7 +605,7 @@ spv_item_get_light_table (const struct spv_item *item,
   struct spvbin_input input;
   spvbin_input_init (&input, data, size);
 
-  struct spvlb_table *table;
+  struct spvlb_table *table = NULL;
   error = (!size
            ? xasprintf ("light table member is empty")
            : !spvlb_parse_table (&input, &table)
@@ -965,7 +965,7 @@ spv_decode_children (struct spv_reader *spv, const char *structure_member,
     {
       const struct spvxml_node *node = seq[i];
 
-      char *error;
+      char *error = NULL;
       if (spvsx_is_container (node))
         {
           const struct spvsx_container *container