CVS commit: pkgsrc/net/zsync

"Ryo ONODERA" <[email protected]>
Newsgroups gmane.os.netbsd.devel.pkgsrc.cvs
Message-ID <[email protected]>
Module Name:	pkgsrc
Committed By:	ryoon
Date:		Mon Jul 27 15:38:31 UTC 2026

Modified Files:
	pkgsrc/net/zsync: Makefile distinfo
Added Files:
	pkgsrc/net/zsync/patches: patch-client.c patch-http.c patch-http.h
	    patch-libzsync_sha1.c patch-libzsync_zsync.c patch-libzsync_zsync.h
	    patch-make.c patch-url.c patch-url.h patch-zlib_inflate.c

Log Message:
net/zsync: Fix build with GCC 14 under NetBSD/amd64 11.99.7

* Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/net/zsync/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/net/zsync/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/zsync/patches/patch-client.c \
    pkgsrc/net/zsync/patches/patch-http.c \
    pkgsrc/net/zsync/patches/patch-http.h \
    pkgsrc/net/zsync/patches/patch-libzsync_sha1.c \
    pkgsrc/net/zsync/patches/patch-libzsync_zsync.c \
    pkgsrc/net/zsync/patches/patch-libzsync_zsync.h \
    pkgsrc/net/zsync/patches/patch-make.c \
    pkgsrc/net/zsync/patches/patch-url.c pkgsrc/net/zsync/patches/patch-url.h \
    pkgsrc/net/zsync/patches/patch-zlib_inflate.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(unnamed) (text/x-diff, 20.9 KB)
Modified files:

Index: pkgsrc/net/zsync/Makefile
diff -u pkgsrc/net/zsync/Makefile:1.3 pkgsrc/net/zsync/Makefile:1.4
--- pkgsrc/net/zsync/Makefile:1.3	Tue Oct 29 10:54:38 2013
+++ pkgsrc/net/zsync/Makefile	Mon Jul 27 15:38:30 2026
@@ -1,16 +1,21 @@
-# $NetBSD: Makefile,v 1.3 2013/10/29 10:54:38 jperkin Exp $
+# $NetBSD: Makefile,v 1.4 2026/07/27 15:38:30 ryoon Exp $
 
 DISTNAME=	zsync-0.6.2
+PKGREVISION=	1
 CATEGORIES=	net
 MASTER_SITES=	http://zsync.moria.org.uk/download/
 EXTRACT_SUFX=	.tar.bz2
 
 MAINTAINER=	[email protected]
-HOMEPAGE=	http://zsync.moria.org.uk/index
+HOMEPAGE=	https://zsync.moria.org.uk/
 COMMENT=	Optimising file distribution program, a 1-to-many rsync
 LICENSE=	artistic-2.0
 
 GNU_CONFIGURE=	yes
-USE_LANGUAGES=	c99
+USE_LANGUAGES=	c
+FORCE_C_STD=	c99
+
+# for strcasecmp(3)
+CPPFLAGS.NetBSD+=	-D_NETBSD_SOURCE
 
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/net/zsync/distinfo
diff -u pkgsrc/net/zsync/distinfo:1.4 pkgsrc/net/zsync/distinfo:1.5
--- pkgsrc/net/zsync/distinfo:1.4	Tue Oct 26 11:07:15 2021
+++ pkgsrc/net/zsync/distinfo	Mon Jul 27 15:38:30 2026
@@ -1,5 +1,15 @@
-$NetBSD: distinfo,v 1.4 2021/10/26 11:07:15 nia Exp $
+$NetBSD: distinfo,v 1.5 2026/07/27 15:38:30 ryoon Exp $
 
 BLAKE2s (zsync-0.6.2.tar.bz2) = d5dfb49daf3b0320c9abff810f81b8c4c21e9cb63f878e3bd02bcbba89defb82
 SHA512 (zsync-0.6.2.tar.bz2) = 56437594831f2320c532759805b5c51116c53c8848f14b54cfd9b76676d1d061abe7fc914264f496ed1c7922fbbd5b884166c855a2fb9eb1285f216e478c5f0d
 Size (zsync-0.6.2.tar.bz2) = 245592 bytes
+SHA1 (patch-client.c) = 948ece2c70234f754bc9e56c8432101a2c4f35eb
+SHA1 (patch-http.c) = 289756cddec3b868019d414b5ad86cd02c225f61
+SHA1 (patch-http.h) = 82994f73b0dbe648cb4c430b57535d8ab5578a75
+SHA1 (patch-libzsync_sha1.c) = 50114434d694733c3a94da18038d1de275b5e771
+SHA1 (patch-libzsync_zsync.c) = fd4f4ccdead3b2d82c9c7bc3e114576cfdf61f72
+SHA1 (patch-libzsync_zsync.h) = 1058dd6b2dd80c22672a7f26f2153030c89518c1
+SHA1 (patch-make.c) = 06d44161c2f3f522078c3795fdb49708a5e6dc18
+SHA1 (patch-url.c) = ecace30a5e022eec933cedd2b5600551da289abf
+SHA1 (patch-url.h) = 5f46c1b285c520b854692e99ded7825e50780bf5
+SHA1 (patch-zlib_inflate.c) = 87c5e066f6ac49d373734d03c0d07e084ea9a9ef

Added files:

Index: pkgsrc/net/zsync/patches/patch-client.c
diff -u /dev/null pkgsrc/net/zsync/patches/patch-client.c:1.1
--- /dev/null	Mon Jul 27 15:38:31 2026
+++ pkgsrc/net/zsync/patches/patch-client.c	Mon Jul 27 15:38:30 2026
@@ -0,0 +1,40 @@
+$NetBSD: patch-client.c,v 1.1 2026/07/27 15:38:30 ryoon Exp $
+
+--- client.c.orig	2010-09-19 20:51:53.000000000 +0000
++++ client.c
+@@ -59,7 +59,7 @@ FILE* open_zcat_pipe(const char* fname)
+         int i, j;
+ 
+         for (i = 0, j = 5; fname[i]; i++) {
+-            if (!isalnum(fname[i]))
++            if (!isalnum((unsigned char)(fname[i])))
+                 cmd[j++] = '\\';
+             cmd[j++] = fname[i];
+         }
+@@ -146,7 +146,7 @@ long long http_down;
+  * number of entries is passed by reference and updated in place. The new entry
+  * is appended to the list.
+  */
+-static void **append_ptrlist(int *n, void **p, void *a) {
++static char **append_ptrlist(int *n, char **p, void *a) {
+     if (!a)
+         return p;
+     p = realloc(p, (*n + 1) * sizeof *p);
+@@ -217,7 +217,7 @@ static char *get_filename_prefix(const char *p) {
+     else
+         t = s;
+     u = t;
+-    while (isalnum(*u)) {
++    while (isalnum((unsigned char)(*u))) {
+         u++;
+     }
+     *u = 0;
+@@ -392,7 +392,7 @@ int fetch_remaining_blocks(struct zsync_state *zs) {
+  */
+ int fetch_remaining_blocks(struct zsync_state *zs) {
+     int n, utype;
+-    const char *const *url = zsync_get_urls(zs, &n, &utype);
++    char **url = zsync_get_urls(zs, &n, &utype);
+     int *status;        /* keep status for each URL - 0 means no error */
+     int ok_urls = n;
+ 
Index: pkgsrc/net/zsync/patches/patch-http.c
diff -u /dev/null pkgsrc/net/zsync/patches/patch-http.c:1.1
--- /dev/null	Mon Jul 27 15:38:31 2026
+++ pkgsrc/net/zsync/patches/patch-http.c	Mon Jul 27 15:38:30 2026
@@ -0,0 +1,47 @@
+$NetBSD: patch-http.c,v 1.1 2026/07/27 15:38:30 ryoon Exp $
+
+--- http.c.orig	2010-09-19 20:51:53.000000000 +0000
++++ http.c
+@@ -89,7 +89,7 @@ FILE *http_get_stream(int fd, int *code) {
+  */
+ FILE *http_get_stream(int fd, int *code) {
+     FILE *f = fdopen(fd, "r");
+-    char buf[256];
++    char buf[256 + 4];
+     char *p;
+ 
+     if (fgets(buf, sizeof(buf), f) == NULL || memcmp(buf, "HTTP/1", 6) != 0
+@@ -160,7 +160,7 @@ char *referer;
+  * Sets the proxy settings for HTTP connections to use; these can be either as
+  * a host[:port] or as http://host[:port].
+  * Returns non-zero if the settings were obtained successfully. */
+-int set_proxy_from_string(const char *s) {
++int set_proxy_from_string(char *s) {
+     if (!memcmp(s, http_scheme, strlen(http_scheme))) {
+         /* http:// style proxy string */
+         proxy = malloc(256);
+@@ -539,11 +539,12 @@ struct range_fetch {
+  * Set up a range_fetch to fetch from a given URL. Private method. 
+  * C is a nightmare for memory allocation here. At least the errors should be
+  * caught, but minor memory leaks may occur on some error paths. */
+-static int range_fetch_set_url(struct range_fetch* rf, const char* orig_url) {
++static int range_fetch_set_url(struct range_fetch* rf, char* orig_url) {
+     /* Get the host, port and path from the URL. */
+-    char hostn[sizeof(rf->hosth)];
++    unsigned int hostnsz = sizeof(rf->hosth) - 4;
++    char hostn[hostnsz];
+     char* cport;
+-    char* p = get_http_host_port(orig_url, hostn, sizeof(hostn), &cport);
++    char* p = get_http_host_port(orig_url, hostn, hostnsz, &cport);
+     if (!p) {
+         return 0;
+     }
+@@ -658,7 +659,7 @@ static char *rfgets(char *buf, size_t len, struct rang
+ /* range_fetch_start(origin_url)
+  * Returns a new range fetch object, for the given URL.
+  */
+-struct range_fetch *range_fetch_start(const char *orig_url) {
++struct range_fetch *range_fetch_start(char *orig_url) {
+     struct range_fetch *rf = malloc(sizeof(struct range_fetch));
+     if (!rf)
+         return NULL;
Index: pkgsrc/net/zsync/patches/patch-http.h
diff -u /dev/null pkgsrc/net/zsync/patches/patch-http.h:1.1
--- /dev/null	Mon Jul 27 15:38:31 2026
+++ pkgsrc/net/zsync/patches/patch-http.h	Mon Jul 27 15:38:30 2026
@@ -0,0 +1,20 @@
+$NetBSD: patch-http.h,v 1.1 2026/07/27 15:38:30 ryoon Exp $
+
+--- http.h.orig	2010-09-16 17:17:49.000000000 +0000
++++ http.h
+@@ -18,13 +18,13 @@ extern char *referer;
+ 
+ extern char *referer;
+ 
+-int set_proxy_from_string(const char* s);
++int set_proxy_from_string(char* s);
+ 
+ FILE* http_get(const char* orig_url, char** track_referer, const char* tfname);
+ 
+ struct range_fetch;
+ 
+-struct range_fetch* range_fetch_start(const char* orig_url);
++struct range_fetch* range_fetch_start(char* orig_url);
+ void range_fetch_addranges(struct range_fetch* rf, off_t* ranges, int nranges);
+ int get_range_block(struct range_fetch* rf, off_t* offset, unsigned char* data, size_t dlen);
+ off_t range_fetch_bytes_down(const struct range_fetch* rf);
Index: pkgsrc/net/zsync/patches/patch-libzsync_sha1.c
diff -u /dev/null pkgsrc/net/zsync/patches/patch-libzsync_sha1.c:1.1
--- /dev/null	Mon Jul 27 15:38:31 2026
+++ pkgsrc/net/zsync/patches/patch-libzsync_sha1.c	Mon Jul 27 15:38:30 2026
@@ -0,0 +1,14 @@
+$NetBSD: patch-libzsync_sha1.c,v 1.1 2026/07/27 15:38:30 ryoon Exp $
+
+* Include endian.h for BYTE_ORDER.
+
+--- libzsync/sha1.c.orig	2026-07-27 00:54:33.490255126 +0000
++++ libzsync/sha1.c
+@@ -23,6 +23,7 @@ static const char rcsid[] = "$OpenBSD: sha1.c,v 1.19 2
+ #include <sys/param.h>
+ #include <stdint.h>
+ #include <string.h>
++#include <endian.h>
+ #include "sha1.h"
+ 
+ #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
Index: pkgsrc/net/zsync/patches/patch-libzsync_zsync.c
diff -u /dev/null pkgsrc/net/zsync/patches/patch-libzsync_zsync.c:1.1
--- /dev/null	Mon Jul 27 15:38:31 2026
+++ pkgsrc/net/zsync/patches/patch-libzsync_zsync.c	Mon Jul 27 15:38:30 2026
@@ -0,0 +1,89 @@
+$NetBSD: patch-libzsync_zsync.c,v 1.1 2026/07/27 15:38:30 ryoon Exp $
+
+* Use calloc properly as calloc(num, size).
+
+--- libzsync/zsync.c.orig	2010-09-19 20:51:53.000000000 +0000
++++ libzsync/zsync.c
+@@ -151,7 +151,7 @@ struct zsync_state *zsync_begin(FILE * f) {
+     char *safelines = NULL;
+ 
+     /* Allocate memory for the object */
+-    struct zsync_state *zs = calloc(sizeof *zs, 1);
++    struct zsync_state *zs = calloc(1, sizeof *zs);
+ 
+     if (!zs)
+         return NULL;
+@@ -210,7 +210,7 @@ struct zsync_state *zsync_begin(FILE * f) {
+             }
+             else if (!strcmp(buf, "Blocksize")) {
+                 zs->blocksize = atol(p);
+-                if (zs->blocksize < 0 || (zs->blocksize & (zs->blocksize - 1))) {
++                if ((zs->blocksize & (zs->blocksize - 1))) {
+                     fprintf(stderr, "nonsensical blocksize %ld\n", zs->blocksize);
+                     free(zs);
+                     return NULL;
+@@ -240,7 +240,7 @@ struct zsync_state *zsync_begin(FILE * f) {
+ 
+                 zblock = malloc(nzblocks * sizeof *zblock);
+                 if (zblock) {
+-                    if (fread(zblock, sizeof *zblock, nzblocks, f) < nzblocks) {
++                    if (fread(zblock, sizeof *zblock, nzblocks, f) < (size_t)nzblocks) {
+                         fprintf(stderr, "premature EOF after Z-Map\n");
+                         free(zs);
+                         return NULL;
+@@ -436,7 +436,7 @@ void zsync_progress(const struct zsync_state *zs, long
+  * Note that these URLs could be for encoded versions of the target; a 'type'
+  * is returned in *type which tells libzsync in later calls what version of the
+  * target is being retrieved. */
+-const char *const *zsync_get_urls(struct zsync_state *zs, int *n, int *t) {
++char **zsync_get_urls(struct zsync_state *zs, int *n, int *t) {
+     if (zs->zmap && zs->nzurl) {
+         *n = zs->nzurl;
+         *t = 1;
+@@ -701,7 +701,7 @@ static int zsync_recompress(struct zsync_state *zs) {
+                     p = skip_zhead(buf);
+                     skip = 0;
+                 }
+-                if (fwrite(p, 1, r - (p - buf), zout) != r - (p - buf)) {
++                if (fwrite(p, 1, r - (p - buf), zout) != (size_t)(r - (p - buf))) {
+                     perror("fwrite");
+                     rc = -1;
+                     goto leave_it;
+@@ -912,7 +912,7 @@ static int zsync_receive_data_compressed(struct zsync_
+  * expected checksum for the corresponding blocks)
+  */
+ static int zsync_receive_data_compressed(struct zsync_receiver *zr,
+-                              const unsigned char *buf, off_t offset,
++                              unsigned char *buf, off_t offset,
+                               size_t len) {
+     int ret = 0;
+     int eoz = 0;
+@@ -925,9 +925,9 @@ static int zsync_receive_data_compressed(struct zsync_
+     zr->strm.next_in = buf;
+     zr->strm.avail_in = len;
+ 
+-    if (zr->strm.total_in == 0 || offset != zr->strm.total_in) {
++    if (zr->strm.total_in == 0 || offset != (off_t)(zr->strm.total_in)) {
+         zsync_configure_zstream_for_zdata(zr->zs, &(zr->strm), offset,
+-                                          &(zr->outoffset));
++                                          (long long *)(&(zr->outoffset)));
+ 
+         /* On first iteration, we might be reading an incomplete block from zsync's point of view. Limit avail_out so we can stop after doing that and realign with the buffer. */
+         zr->strm.avail_out = blocksize - (zr->outoffset % blocksize);
+@@ -952,6 +952,7 @@ static int zsync_receive_data_compressed(struct zsync_
+         switch (rc) {
+         case Z_STREAM_END:
+             eoz = 1;
++            /* FALLTHROUGH */
+         case Z_BUF_ERROR:
+         case Z_OK:
+             if (zr->strm.avail_out == 0 || eoz) {
+@@ -991,7 +992,7 @@ static int zsync_receive_data_compressed(struct zsync_
+  * Returns 0 unless there's an error (e.g. the submitted data doesn't match the
+  * expected checksum for the corresponding blocks)
+  */
+-int zsync_receive_data(struct zsync_receiver *zr, const unsigned char *buf,
++int zsync_receive_data(struct zsync_receiver *zr, unsigned char *buf,
+                        off_t offset, size_t len) {
+     if (zr->url_type == 1) {
+         return zsync_receive_data_compressed(zr, buf, offset, len);
Index: pkgsrc/net/zsync/patches/patch-libzsync_zsync.h
diff -u /dev/null pkgsrc/net/zsync/patches/patch-libzsync_zsync.h:1.1
--- /dev/null	Mon Jul 27 15:38:31 2026
+++ pkgsrc/net/zsync/patches/patch-libzsync_zsync.h	Mon Jul 27 15:38:30 2026
@@ -0,0 +1,20 @@
+$NetBSD: patch-libzsync_zsync.h,v 1.1 2026/07/27 15:38:30 ryoon Exp $
+
+--- libzsync/zsync.h.orig	2010-09-16 17:17:49.000000000 +0000
++++ libzsync/zsync.h
+@@ -58,7 +58,7 @@ int zsync_submit_source_file(struct zsync_state* zs, F
+  * (the URL pointers are still referenced by the library, and are valid only until zsync_end).
+  */
+ 
+-const char * const * zsync_get_urls(struct zsync_state* zs, int* n, int* t);
++char ** zsync_get_urls(struct zsync_state* zs, int* n, int* t);
+ 
+ /* zsync_needed_byte_ranges - get the byte ranges needed from a URL.
+  * Returns the number of ranges in *num, and a malloc'd array (to be freed 
+@@ -91,5 +91,5 @@ void zsync_end_receive(struct zsync_receiver* zr);
+ 
+ /* Supply data buf of length len received corresponding to offset offset from the URL.
+  * Returns 0 for success; if not, you should not submit more data. */
+-int zsync_receive_data(struct zsync_receiver* zr, const unsigned char* buf, off_t offset, size_t len);
++int zsync_receive_data(struct zsync_receiver* zr, unsigned char* buf, off_t offset, size_t len);
+ 
Index: pkgsrc/net/zsync/patches/patch-make.c
diff -u /dev/null pkgsrc/net/zsync/patches/patch-make.c:1.1
--- /dev/null	Mon Jul 27 15:38:31 2026
+++ pkgsrc/net/zsync/patches/patch-make.c	Mon Jul 27 15:38:30 2026
@@ -0,0 +1,31 @@
+$NetBSD: patch-make.c,v 1.1 2026/07/27 15:38:30 ryoon Exp $
+
+--- make.c.orig	2010-09-16 17:17:49.000000000 +0000
++++ make.c
+@@ -441,7 +441,7 @@ static char *encode_filename(const char *fname) {
+     {   /* pass through string character by character */
+         int i, j;
+         for (i = j = 0; fname[i]; i++) {
+-            if (!isalnum(fname[i]))
++            if (!isalnum((unsigned char)(fname[i])))
+                 cmd[j++] = '\\';
+             cmd[j++] = fname[i];
+         }
+@@ -718,7 +718,7 @@ int main(int argc, char **argv) {
+     read_stream_write_blocksums(instream, tf);
+ 
+     {   /* Decide how long a rsum hash and checksum hash per block we need for this file */
+-        seq_matches = len > blocksize ? 2 : 1;
++        seq_matches = len > (off_t)blocksize ? 2 : 1;
+         rsum_len = ceil(((log(len) + log(blocksize)) / log(2) - 8.6) / seq_matches / 8);
+ 
+         /* min and max lengths of rsums to store */
+@@ -836,7 +836,7 @@ int main(int argc, char **argv) {
+                     fprintf(fout, "MTime: %s\n", buf);
+             }
+             else {
+-                fprintf(stderr, "error converting %d to struct tm\n", mtime);
++                fprintf(stderr, "error converting %ld to struct tm\n", mtime);
+             }
+         }
+     }
Index: pkgsrc/net/zsync/patches/patch-url.c
diff -u /dev/null pkgsrc/net/zsync/patches/patch-url.c:1.1
--- /dev/null	Mon Jul 27 15:38:31 2026
+++ pkgsrc/net/zsync/patches/patch-url.c	Mon Jul 27 15:38:30 2026
@@ -0,0 +1,13 @@
+$NetBSD: patch-url.c,v 1.1 2026/07/27 15:38:30 ryoon Exp $
+
+--- url.c.orig	2026-07-27 14:30:13.132895329 +0000
++++ url.c
+@@ -36,7 +36,7 @@ const char http_scheme[] = { "http://" };
+  * return value is the path part of the URL, a malloced string.
+  * Or return value NULL on failure (host and port could have been written to).
+  */
+-char *get_http_host_port(const char *url, char *hostn, int hnlen, char **port) {
++char *get_http_host_port(char *url, char *hostn, int hnlen, char **port) {
+     char *p, *q;
+ 
+     /* Check it's HTTP */
Index: pkgsrc/net/zsync/patches/patch-url.h
diff -u /dev/null pkgsrc/net/zsync/patches/patch-url.h:1.1
--- /dev/null	Mon Jul 27 15:38:31 2026
+++ pkgsrc/net/zsync/patches/patch-url.h	Mon Jul 27 15:38:30 2026
@@ -0,0 +1,13 @@
+$NetBSD: patch-url.h,v 1.1 2026/07/27 15:38:30 ryoon Exp $
+
+--- url.h.orig	2026-07-27 14:31:08.787889570 +0000
++++ url.h
+@@ -20,7 +20,7 @@ extern const char http_scheme[];
+  * and, if present, return a (malloced) string buffer containing the port string.
+  * Or return NULL if not HTTP or other parsing failure.
+  */
+-char* get_http_host_port(const char* url, char* hostn, int hnlen, char** port);
++char* get_http_host_port(char* url, char* hostn, int hnlen, char** port);
+ 
+ char* __attribute__((pure)) make_url_absolute(const char* base, const char* url);
+ 
Index: pkgsrc/net/zsync/patches/patch-zlib_inflate.c
diff -u /dev/null pkgsrc/net/zsync/patches/patch-zlib_inflate.c:1.1
--- /dev/null	Mon Jul 27 15:38:31 2026
+++ pkgsrc/net/zsync/patches/patch-zlib_inflate.c	Mon Jul 27 15:38:31 2026
@@ -0,0 +1,127 @@
+$NetBSD: patch-zlib_inflate.c,v 1.1 2026/07/27 15:38:31 ryoon Exp $
+
+--- zlib/inflate.c.orig	2010-09-16 17:17:49.000000000 +0000
++++ zlib/inflate.c
+@@ -637,6 +637,7 @@ int flush;
+             if (state->flags & 0x0200) CRC2(state->check, hold);
+             INITBITS();
+             state->mode = EXLEN;
++            /* FALLTHROUGH */
+         case EXLEN:
+             if (state->flags & 0x0400) {
+                 NEEDBITS(16);
+@@ -645,6 +646,7 @@ int flush;
+                 INITBITS();
+             }
+             state->mode = EXTRA;
++            /* FALLTHROUGH */
+         case EXTRA:
+             if (state->flags & 0x0400) {
+                 copy = state->length;
+@@ -659,6 +661,7 @@ int flush;
+                 if (state->length) goto inf_leave;
+             }
+             state->mode = NAME;
++            /* FALLTHROUGH */
+         case NAME:
+             if (state->flags & 0x0800) {
+                 if (have == 0) goto inf_leave;
+@@ -673,6 +676,7 @@ int flush;
+                 if (len) goto inf_leave;
+             }
+             state->mode = COMMENT;
++            /* FALLTHROUGH */
+         case COMMENT:
+             if (state->flags & 0x1000) {
+                 if (have == 0) goto inf_leave;
+@@ -687,6 +691,7 @@ int flush;
+                 if (len) goto inf_leave;
+             }
+             state->mode = HCRC;
++            /* FALLTHROUGH */
+         case HCRC:
+             if (state->flags & 0x0200) {
+                 NEEDBITS(16);
+@@ -706,6 +711,7 @@ int flush;
+             strm->adler = state->check = REVERSE(hold);
+             INITBITS();
+             state->mode = DICT;
++            /* FALLTHROUGH */
+         case DICT:
+             if (state->havedict == 0) {
+                 RESTORE();
+@@ -713,8 +719,10 @@ int flush;
+             }
+             strm->adler = state->check = adler32(0L, Z_NULL, 0);
+             state->mode = TYPE;
++            /* FALLTHROUGH */
+         case TYPE:
+             if (flush == Z_BLOCK) goto inf_leave;
++            /* FALLTHROUGH */
+         case TYPEDO:
+             if (state->last) {
+                 BYTEBITS();
+@@ -760,6 +768,7 @@ int flush;
+                     state->length));
+             INITBITS();
+             state->mode = COPY;
++            /* FALLTHROUGH */
+         case COPY:
+             copy = state->length;
+             if (copy) {
+@@ -890,6 +899,7 @@ int flush;
+             }
+             Tracev((stderr, "inflate:       codes ok\n"));
+             state->mode = LEN;
++            /* FALLTHROUGH */
+         case LEN:
+ 	    state->mode = LENDO;
+ 	    goto inf_leave;
+@@ -931,6 +941,7 @@ int flush;
+             }
+             state->extra = (unsigned)(this.op) & 15;
+             state->mode = LENEXT;
++            /* FALLTHROUGH */
+         case LENEXT:
+             if (state->extra) {
+                 NEEDBITS(state->extra);
+@@ -939,6 +950,7 @@ int flush;
+             }
+             Tracevv((stderr, "inflate:         length %u\n", state->length));
+             state->mode = DIST;
++            /* FALLTHROUGH */
+         case DIST:
+             for (;;) {
+                 this = state->distcode[BITS(state->distbits)];
+@@ -964,6 +976,7 @@ int flush;
+             state->offset = (unsigned)this.val;
+             state->extra = (unsigned)(this.op) & 15;
+             state->mode = DISTEXT;
++            /* FALLTHROUGH */
+         case DISTEXT:
+             if (state->extra) {
+                 NEEDBITS(state->extra);
+@@ -977,6 +990,7 @@ int flush;
+             }
+             Tracevv((stderr, "inflate:         distance %u\n", state->offset));
+             state->mode = MATCH;
++            /* FALLTHROUGH */
+         case MATCH:
+             if (left == 0) goto inf_leave;
+             copy = out - left;
+@@ -1032,6 +1046,7 @@ int flush;
+             }
+ #ifdef GUNZIP
+             state->mode = LENGTH;
++            /* FALLTHROUGH */
+         case LENGTH:
+             if (state->wrap && state->flags) {
+                 NEEDBITS(32);
+@@ -1045,6 +1060,7 @@ int flush;
+             }
+ #endif
+             state->mode = DONE;
++            /* FALLTHROUGH */
+         case DONE:
+             ret = Z_STREAM_END;
+             goto inf_leave;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.