utils/pdftotext.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit c43a80e65fc570a8017892ba111a8c48ac33d9ad Author: Hib Eris <[email protected]> Date: Fri Nov 15 19:59:52 2013 +0100 pdftotext: Silence warning for may be used uninitialized variable Bug #71640 diff --git a/utils/pdftotext.cc b/utils/pdftotext.cc index c592329..62ba3a3 100644 --- a/utils/pdftotext.cc +++ b/utils/pdftotext.cc @@ -341,7 +341,7 @@ int main(int argc, char *argv[]) { } // write text file - if (bbox) { + if (htmlMeta && bbox) { // htmlMeta && is superfluous but makes gcc happier textOut = new TextOutputDev(NULL, physLayout, fixedPitch, rawOrder, htmlMeta); if (textOut->isOk()) { commit f905d804c0d1c715d8423938f41b5a002c0ef15d Author: Hib Eris <[email protected]> Date: Fri Nov 15 19:55:19 2013 +0100 Do not close stdout in pdftotext Bug #71639 diff --git a/utils/pdftotext.cc b/utils/pdftotext.cc index 3b8b69f..c592329 100644 --- a/utils/pdftotext.cc +++ b/utils/pdftotext.cc @@ -18,7 +18,7 @@ // Copyright (C) 2006 Dominic Lachowicz <[email protected]> // Copyright (C) 2007-2008, 2010, 2011 Albert Astals Cid <[email protected]> // Copyright (C) 2009 Jan Jockusch <[email protected]> -// Copyright (C) 2010 Hib Eris <[email protected]> +// Copyright (C) 2010, 2013 Hib Eris <[email protected]> // Copyright (C) 2010 Kenneth Berland <[email protected]> // Copyright (C) 2011 Tom Gleason <[email protected]> // Copyright (C) 2011 Steven Murdoch <[email protected]> @@ -367,7 +367,9 @@ int main(int argc, char *argv[]) { } fprintf(f, "</doc>\n"); } - fclose(f); + if (f != stdout) { + fclose(f); + } } else { textOut = new TextOutputDev(textFileName->getCString(), physLayout, fixedPitch, rawOrder, htmlMeta); _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
