Fix errors reported by Coverity

Thanks to Jiri Popelka from Red Hat for sending the output of a
Coverity run over qpdf.