glib/poppler-document.cc | 2 +- goo/gfile.cc | 5 ++--- poppler/FileSpec.cc | 3 ++- poppler/GlobalParamsWin.cc | 4 ++-- poppler/PDFDoc.cc | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-)
New commits: commit aca122432951c4c0a2a5dbaba046d848f2153b84 Author: Hib Eris <[email protected]> Date: Sat Jun 23 18:27:55 2012 +0200 Fix compile warning on unused variable filename_g diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc index 5670300..61d92e8 100644 --- a/glib/poppler-document.cc +++ b/glib/poppler-document.cc @@ -169,7 +169,6 @@ poppler_document_new_from_file (const char *uri, GError **error) { PDFDoc *newDoc; - GooString *filename_g; GooString *password_g; char *filename; @@ -198,6 +197,7 @@ poppler_document_new_from_file (const char *uri, newDoc = new PDFDoc(filenameW, length, password_g, password_g); delete [] filenameW; #else + GooString *filename_g; filename_g = new GooString (filename); newDoc = new PDFDoc(filename_g, password_g, password_g); #endif commit c702066961b1cc2a9c0fb16546e9db93c312813b Author: Hib Eris <[email protected]> Date: Sat Jun 23 18:23:59 2012 +0200 Do not use 'size' uninitialized diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc index f52d498..b0678e8 100644 --- a/poppler/PDFDoc.cc +++ b/poppler/PDFDoc.cc @@ -21,7 +21,7 @@ // Copyright (C) 2009 Eric Toombs <[email protected]> // Copyright (C) 2009 Kovid Goyal <[email protected]> // Copyright (C) 2009, 2011 Axel Struebing <[email protected]> -// Copyright (C) 2010, 2011 Hib Eris <[email protected]> +// Copyright (C) 2010-2012 Hib Eris <[email protected]> // Copyright (C) 2010 Jakub Wilk <[email protected]> // Copyright (C) 2010 Ilya Gorenbein <[email protected]> // Copyright (C) 2010 Srinivas Adicherla <[email protected]> @@ -189,7 +189,7 @@ PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword, // try to open file // NB: _wfopen is only available in NT struct _stat buf; - int size; + int size = 0; version.dwOSVersionInfoSize = sizeof(version); GetVersionEx(&version); if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) { @@ -203,7 +203,7 @@ PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword, } file = fopen(fileName->getCString(), "rb"); } - if (!file) { + if (!size || !file) { error(errIO, -1, "Couldn't open file '{0:t}'", fileName); errCode = errOpenFile; return; commit 14bdeacb0eb8e4a1d3995f310a1b526e4dcc96dc Author: Hib Eris <[email protected]> Date: Sat Jun 23 18:09:01 2012 +0200 Fix compile warnings on deprecated conversion from string constant to 'char*' diff --git a/poppler/FileSpec.cc b/poppler/FileSpec.cc index 1adcf5b..bac1eae 100644 --- a/poppler/FileSpec.cc +++ b/poppler/FileSpec.cc @@ -8,6 +8,7 @@ // Copyright (C) 2008-2009 Carlos Garcia Campos <[email protected]> // Copyright (C) 2009 Kovid Goyal <[email protected]> // Copyright (C) 2012 Albert Astals Cid <[email protected]> +// Copyright (C) 2012 Hib Eris <[email protected]> // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -229,7 +230,7 @@ GBool getFileSpecNameForPlatform (Object *fileSpec, Object *fileName) if (!fileSpec->dictLookup("F", fileName)->isString ()) { fileName->free(); #ifdef _WIN32 - char *platform = "DOS"; + const char *platform = "DOS"; #else const char *platform = "Unix"; #endif diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc index 527f08e..b76e156 100644 --- a/poppler/GlobalParamsWin.cc +++ b/poppler/GlobalParamsWin.cc @@ -1,7 +1,7 @@ /* Written by Krzysztof Kowalczyk (http://blog.kowalczyk.info) but mostly based on xpdf code. - // Copyright (C) 2010 Hib Eris <[email protected]> + // Copyright (C) 2010, 2012 Hib Eris <[email protected]> // Copyright (C) 2012 Thomas Freitag <[email protected]> // Copyright (C) 2012 Suzuki Toshiya <[email protected]> // Copyright (C) 2012 Adrian Johnson <[email protected]> @@ -242,7 +242,7 @@ static bool FileExists(const char *path) void SysFontList::scanWindowsFonts(GooString *winFontDir) { OSVERSIONINFO version; - char *path; + const char *path; DWORD idx, valNameLen, dataLen, type; HKEY regKey; char valName[1024], data[1024]; commit 72d4a1ba998218de876e2a0e939bbec4b7795299 Author: Hib Eris <[email protected]> Date: Sat Jun 23 17:52:13 2012 +0200 Fix compile warning on signed/unsigned comparison diff --git a/goo/gfile.cc b/goo/gfile.cc index a1895dd..b075b2b 100644 --- a/goo/gfile.cc +++ b/goo/gfile.cc @@ -461,7 +461,7 @@ FILE *openFile(const char *path, const char *mode) { char nPath[_MAX_PATH + 1]; wchar_t wMode[8]; const char *p; - int i; + size_t i; // NB: _wfopen is only available in NT version.dwOSVersionInfoSize = sizeof(version); commit 1262111e70ff161e495505bd6a262cc0357a943c Author: Hib Eris <[email protected]> Date: Sat Jun 23 17:46:54 2012 +0200 Remove unused variable diff --git a/goo/gfile.cc b/goo/gfile.cc index 604c0fa..a1895dd 100644 --- a/goo/gfile.cc +++ b/goo/gfile.cc @@ -18,7 +18,7 @@ // Copyright (C) 2006 Takashi Iwai <[email protected]> // Copyright (C) 2006 Kristian Høgsberg <[email protected]> // Copyright (C) 2008 Adam Batkin <[email protected]> -// Copyright (C) 2008, 2010 Hib Eris <[email protected]> +// Copyright (C) 2008, 2010, 2012 Hib Eris <[email protected]> // Copyright (C) 2009, 2012 Albert Astals Cid <[email protected]> // Copyright (C) 2009 Kovid Goyal <[email protected]> // @@ -336,7 +336,6 @@ GBool openTempFile(GooString **name, FILE **f, const char *mode) { //---------- Win32 ---------- char *tempDir; GooString *s, *s2; - char buf[32]; FILE *f2; int t, i;
_______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
