This small patch removes some nasty msvc warnings. Especially the changes in the headers are important as they're included in other projects and produce a lot of unneeded output. The diff is against 0.12.4
Created attachment 33648 [details] [review] Patch to reduce msvc warnings
Any chance you can try 0.13.1? The header warnings are fixed it seems and i'd like to know if there are more bool/GBool mismatchs
I tried gitHEAD and got a gBool warning in catalog.h:20 and some other places (Annot.cc:2245,753) - will let you know more this evening. Currently gitHEAD does not compile (with msvc) because GlobalParams.cc:182/184 - const uchar* can't be converted to uchar*.
It would also be nice to add if(msvc) add_definitions( -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE ) endif(msvc) to net get warnigns about 'deprecated' functions like strdup(). The fix for GlobalParams.cc is easy - just remove the cast to 'const unsigned char*' - 'unsigned char*' is enough. Looks like ms has an overloaded _mbsrchr() which takes and returns a const usnigned char* ... Now I'm stuck at SplashOutputDev.cc:1987 - finite() isn't available on win. You have to use _finite() (http://msdn.microsoft.com/de-de/library/sb8es7a8(VS.80).aspx) --> #ifdef _MSC_VER #include <float.h> inline double isfinite(double x) { return _finite(x); } #endif
The changes in poppler/GfxState.h (the most "spammy" ones) were done months ago.
For the remaning warnings of this bug, worked with Patrick Spendrin (and then pushed to master) on a patch to disable warning C4800.
Always with Patrick we sorted out building, can you please try it again, Christian?
All fine with msvc2005 & 2008, only the add_definitions() is still missing :)
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.