ascii.c: Move auto out of the #if HAVE_DECL_SIGWINCH condtional
[pspp] / src / data / ods-reader.c
index 9bbfb479e2b9e8d02c1b6642e6ad81193b3a1e3c..122e98c76d90060da92d7e79bca19adcc2599ff0 100644 (file)
@@ -127,7 +127,7 @@ ods_file_casereader_destroy (struct casereader *reader UNUSED, void *r_)
     xmlFreeTextReader (r->xtr);
 
   if ( ! ds_is_empty (&r->ods_errs))
-    msg (ME, ds_cstr (&r->ods_errs));
+    msg (ME, "%s", ds_cstr (&r->ods_errs));
 
   ds_destroy (&r->ods_errs);
 
@@ -411,8 +411,10 @@ ods_open_reader (struct spreadsheet_read_info *gri, struct dictionary **dict)
   /* If CELLRANGE was given, then we know how many variables should be read */
   if ( r->stop_col != -1 )
     {
+      assert (var_spec == NULL);
       n_var_specs =  r->stop_col - r->start_col + 1;
       var_spec = xrealloc (var_spec, sizeof (*var_spec) * n_var_specs);
+      memset (var_spec, '\0', sizeof (*var_spec) * n_var_specs);
     }