ref: 06800cf352d454fdb472bb50c8434483132797b7
parent: c0353a0c6a202dfc38ff0b50c46981cb2ba31fa4
author: Sebastian Rasmussen <sebras@gmail.com>
date: Tue May 22 22:00:49 EDT 2018
jbig2dec: Only return jbig2_error() for fatal errors/warnings. Only calls to jbig2_error() using fatal errors or warnings may return, no calls to jbig2_error() using informational or debug messages may return. This is preparation for jbig2_error() to always return -1 for errors/warnings.
--- a/jbig2_refinement.c
+++ b/jbig2_refinement.c
@@ -86,11 +86,11 @@
snprintf(name, 32, "refin-%d.pbm", count);
code = jbig2_image_write_pbm_file(ref, name);
if (code < 0)
- return jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, -1, "failed write refinement input");
+ return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, -1, "failed write refinement input");
snprintf(name, 32, "refout-%d.pbm", count);
code = jbig2_image_write_pbm_file(image, name);
if (code < 0)
- return jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, -1, "failed write refinement output");
+ return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, -1, "failed write refinement output");
count++;
}
#endif
--- a/jbig2_segment.c
+++ b/jbig2_segment.c
@@ -272,7 +272,7 @@
return jbig2_end_of_stripe(ctx, segment, segment_data);
case 51:
ctx->state = JBIG2_FILE_EOF;
- return jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number, "end of file");
+ jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number, "end of file");
case 52:
return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "unhandled segment type 'profile'");
case 53: /* user-supplied huffman table */