diff options
author | Jay Berkenbilt <ejb@ql.org> | 2023-02-19 01:37:38 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2023-02-19 01:38:49 +0100 |
commit | 0f97e98203dfa78cf3273005f215d2d026390e5c (patch) | |
tree | c02b7969653620375d2482ce614e72414cd82bc7 /libqpdf/QPDFJob.cc | |
parent | 088fabd9b9affe14c006e1354892f80c7bbbeebe (diff) | |
download | qpdf-0f97e98203dfa78cf3273005f215d2d026390e5c.tar.zst |
Handle linearization warnings as proper warning (fixes #851)
Diffstat (limited to 'libqpdf/QPDFJob.cc')
-rw-r--r-- | libqpdf/QPDFJob.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libqpdf/QPDFJob.cc b/libqpdf/QPDFJob.cc index 6cd3c385..e311a1e4 100644 --- a/libqpdf/QPDFJob.cc +++ b/libqpdf/QPDFJob.cc @@ -783,7 +783,6 @@ QPDFJob::doCheck(QPDF& pdf) // continue to perform additional checks after finding // errors. bool okay = true; - bool warnings = false; auto& cout = *this->m->log->getInfo(); cout << "checking " << m->infilename.get() << "\n"; try { @@ -796,12 +795,7 @@ QPDFJob::doCheck(QPDF& pdf) showEncryption(pdf); if (pdf.isLinearized()) { cout << "File is linearized\n"; - // any errors or warnings are reported by - // checkLinearization(). We treat all issues reported here - // as warnings. - if (!pdf.checkLinearization()) { - warnings = true; - } + pdf.checkLinearization(); } else { cout << "File is not linearized\n"; } @@ -836,7 +830,7 @@ QPDFJob::doCheck(QPDF& pdf) throw std::runtime_error("errors detected"); } - if ((!pdf.getWarnings().empty()) || warnings) { + if (!pdf.getWarnings().empty()) { this->m->warnings = true; } else { *this->m->log->getInfo() << "No syntax or stream encoding errors" |