madler/zlib — pull request #29 by jasonwilliams200OK (2012-11-27 04:28:28+00:00)
Title: Trouble with double pointer

I am following [these instructions](http://tpgit.github.com/UnOfficialLeptDocs/vs2008/building-image-libraries.html#building-zlib) to test the zlibStat library with testzlib. When I try to build testzlib, [VS2012](http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-windows-desktop) throws the following error in [**testzlib.c**](https://github.com/madler/zlib/blob/master/contrib/testzlib/testzlib.c), Line: 167, Char:43:

>IntelliSense: argument of type "unsigned char **" is incompatible with parameter of type "void **"

Implicit conversion doesn't work with double indirection. Converting char* to void* is ok, but char** to void** isn't. See here for more details: http://c-faq.com/ptrs/genericpp.html

I replaced the ReadFileMemory signature with `ReadFileMemory(const char* filename,long* plFileSize,unsigned char** pFilePtr)`.

After that, I got an error on line 141, so I changed it to `*pFilePtr=(unsigned char*)ptr;`.