[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] [PATCH v2] fix build warnings with newer zlib

From: Mike Frysinger
Subject: [Bug-wget] [PATCH v2] fix build warnings with newer zlib
Date: Thu, 24 May 2012 20:13:32 -0400

The gz* API from zlib takes a "gzFile", not a "gzFile*".  Older versions
of zlib didn't trigger a warning because it was typedefed to a void*, but
newer ones typedef it to a struct*, so trying to use struct** triggers
warnings where void** would not.

Tweak the type of warc_current_gzfile to work warning free with old and
new versions of zlib.  In terms of generated code, it shouldn't make a
difference as a pointer is the same size regardless of what it points to
(struct, pointer, something else).

Signed-off-by: Mike Frysinger <address@hidden>
        - update commit message

 src/warc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/warc.c b/src/warc.c
index 57fdcad..9b4329d 100644
--- a/src/warc.c
+++ b/src/warc.c
@@ -75,7 +75,7 @@ static FILE *warc_current_file;
 #ifdef HAVE_LIBZ
 /* The gzip stream for the current WARC file
    (or NULL, if WARC or gzip is disabled). */
-static gzFile *warc_current_gzfile;
+static gzFile warc_current_gzfile;
 /* The offset of the current gzip record in the WARC file. */
 static off_t warc_current_gzfile_offset;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]