X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fspv%2Fspv.c;h=7a3dae4d3d4a733834bf534534a1483b9ae9772e;hb=df1d194af32e35739355981252785e768f21ebb0;hp=2e5dd07b2bf426a2694d91a1afd5d3558ee9e56b;hpb=5ce9c6ba1502e623ec6723a8273da77e5858b8d4;p=pspp diff --git a/src/output/spv/spv.c b/src/output/spv/spv.c index 2e5dd07b2b..7a3dae4d3d 100644 --- a/src/output/spv/spv.c +++ b/src/output/spv/spv.c @@ -321,6 +321,9 @@ decode_page_paragraph (const struct spvsx_page_paragraph *page_paragraph, { memset (ph, 0, sizeof *ph); + if (!page_paragraph) + return; + const struct spvsx_page_paragraph_text *page_paragraph_text = page_paragraph->page_paragraph_text; if (!page_paragraph_text) @@ -839,7 +842,6 @@ spv_read (const char *filename, struct output_item **outp, if (psp) *psp = NULL; - struct spv_reader *spv = xzalloc (sizeof *spv); struct zip_reader *zip; char *error = zip_reader_create (filename, &zip); if (error) @@ -883,15 +885,13 @@ spv_decode_fmt_spec (uint32_t u32, struct fmt_spec *out) uint8_t w = u32 >> 8; uint8_t d = u32; - msg_disable (); *out = (struct fmt_spec) { .type = FMT_F, .w = w, .d = d }; bool ok = raw_type >= 40 || fmt_from_io (raw_type, &out->type); if (ok) { fmt_fix_output (out); - ok = fmt_check_width_compat (out, 0); + ok = fmt_check_width_compat (*out, 0); } - msg_enable (); if (!ok) {