spv: Avoid some compiler warnings on mingw.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 27 Oct 2020 02:36:08 +0000 (19:36 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 27 Oct 2020 02:36:08 +0000 (19:36 -0700)
The mingw compiler warned about these, and it's harmless to avoid them.

src/output/spv/spv-legacy-data.c
src/output/spv/spv-light-decoder.c

index 703d0b1e1e20dd1b4bdd0203b6ad0bac31020fe5..4e3d72c4a4c1832af4a66d6de64497407d6db1d2 100644 (file)
@@ -360,7 +360,7 @@ spv_legacy_data_decode (const uint8_t *in, size_t size, struct spv_data *out)
       source->n_values = md->n_values;
       source->vars = xcalloc (md->n_variables, sizeof *source->vars);
 
-      size_t end;
+      size_t end = -1;
       error = decode_data (in, size, md->data_offset, source, &end);
       if (error)
         goto error;
index 2cc7f63221ad9b1d9396b51a0c2340bc74ce2d65..ebac2a56355b4f86eefbafffda7be516c7997aba 100644 (file)
@@ -377,7 +377,7 @@ decode_spvlb_value (const struct pivot_table *table,
       break;
 
     default:
-      assert (0);
+      abort ();
     }
 
   if (vm)