error using MacPorts zlib, not present with system zlib?
ecronin at macports.org
Wed Feb 22 19:08:45 PST 2012
On Feb 22, 2012, at 10:02 PM, Brandon Allbery wrote:
> On Wed, Feb 22, 2012 at 21:36, Mike Alexander <mta at umich.edu> wrote:
> --On February 22, 2012 4:50:52 PM -0500 Eric Cronin <ecronin at macports.org> wrote:
> This code is wrong. The zlib documentation says gzgetc takes a
> gzFile* not a void*.
> typedef struct gzFile_s *gzFile;
> so it's defined as a pointer. Some compilers at some warning levels get annoyed if you use a gzFile* instead of gzFile for these parameters.
> As they well should.
Yeah, that was a typo/glancing at the docs too quickly (it is a pointer type eventually which makes it void* convertable). I don't think any compiler would let you pass a gzFile* to a function expecting a gzFile at any warning level, C's type system isn't *that* bad.
More information about the macports-users