[poppler] mingw-gcc fix for GlobalParamsWin.cc
Albert Astals Cid
aacid at kde.org
Fri Mar 23 12:00:47 PDT 2012
El Divendres, 23 de març de 2012, a les 14:56:44, mpsuzuki at hiroshima-u.ac.jp
va escriure:
> Hi,
>
> Now I'm testing poppler on MinGW environment and
> found that the patch by Thomas (dae29c6c201cd69cbf4f008de865cc19a36f29b3)
> has a problem. MinGW gcc compiler rejects new function
> findSubstituteName() as,
>
> In file included from /tmp/poppler-current/poppler/GlobalParams.cc:1324:
> /tmp/poppler-current/poppler/GlobalParamsWin.cc: In member function 'void
> SysFontList::scanWindowsFonts(GooString*)':
> /tmp/poppler-current/poppler/GlobalParamsWin.cc:242: warning: deprecated
> conversion from string constant to 'char*'
> /tmp/poppler-current/poppler/GlobalParamsWin.cc:244: warning: deprecated
> conversion from string constant to 'char*'
> /tmp/poppler-current/poppler/GlobalParamsWin.cc: In function 'char*
> findSubstituteName(GfxFont*, GooHash*, const char*)':
> /tmp/poppler-current/poppler/GlobalParamsWin.cc:470: error: invalid
> conversion from 'const char*' to 'char*'
>
> Thus, I propose to change the type of findSubstituteName()
> from char* to const char*, like this:
>
> diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc
> index dd8768a..90f49ef 100644
> --- a/poppler/GlobalParamsWin.cc
> +++ b/poppler/GlobalParamsWin.cc
> @@ -448,7 +448,7 @@ void GlobalParams::setupBaseFonts(char * dir)
> }
> }
>
> -static char *findSubstituteName(GfxFont *font, GooHash *substFiles, const
> char *origName) +static const char *findSubstituteName(GfxFont *font,
> GooHash *substFiles, const char *origName) {
> assert(origName);
> if (!origName) return NULL;
Commited.
Albert
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
More information about the poppler
mailing list