aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Nijtmans <jan.nijtmans@gmail.com>2026-02-03 13:21:58 +0000
committerMark Adler <git@madler.net>2026-02-03 14:31:01 -0800
commit060c9e7c45f3ef736acffc35a8a83c52763f9a95 (patch)
tree2b7fdd08bc8c0edee9c2f26d5474d27242731f0a
parent9f25df2c80c2b26c8b050fba880f0851d9d243ea (diff)
downloadzlib-060c9e7c45f3ef736acffc35a8a83c52763f9a95.tar.gz
zlib-060c9e7c45f3ef736acffc35a8a83c52763f9a95.tar.bz2
zlib-060c9e7c45f3ef736acffc35a8a83c52763f9a95.zip
Remove all uses of the obsolete keyword "register".
-rw-r--r--contrib/minizip/crypt.h2
-rw-r--r--deflate.c26
-rw-r--r--trees.c2
3 files changed, 15 insertions, 15 deletions
diff --git a/contrib/minizip/crypt.h b/contrib/minizip/crypt.h
index f4b93b78..8bde464b 100644
--- a/contrib/minizip/crypt.h
+++ b/contrib/minizip/crypt.h
@@ -50,7 +50,7 @@ static int update_keys(unsigned long* pkeys, const z_crc_t* pcrc_32_tab, int c)
50 (*(pkeys+1)) += (*(pkeys+0)) & 0xff; 50 (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
51 (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1; 51 (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
52 { 52 {
53 register int keyshift = (int)((*(pkeys+1)) >> 24); 53 int keyshift = (int)((*(pkeys+1)) >> 24);
54 (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift); 54 (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
55 } 55 }
56 return c; 56 return c;
diff --git a/deflate.c b/deflate.c
index 6ec1e456..1c29e2b4 100644
--- a/deflate.c
+++ b/deflate.c
@@ -1377,9 +1377,9 @@ int ZEXPORT deflateCopy(z_streamp dest, z_streamp source) {
1377 */ 1377 */
1378local uInt longest_match(deflate_state *s, IPos cur_match) { 1378local uInt longest_match(deflate_state *s, IPos cur_match) {
1379 unsigned chain_length = s->max_chain_length;/* max hash chain length */ 1379 unsigned chain_length = s->max_chain_length;/* max hash chain length */
1380 register Bytef *scan = s->window + s->strstart; /* current string */ 1380 Bytef *scan = s->window + s->strstart; /* current string */
1381 register Bytef *match; /* matched string */ 1381 Bytef *match; /* matched string */
1382 register int len; /* length of current match */ 1382 int len; /* length of current match */
1383 int best_len = (int)s->prev_length; /* best match length so far */ 1383 int best_len = (int)s->prev_length; /* best match length so far */
1384 int nice_match = s->nice_match; /* stop if match long enough */ 1384 int nice_match = s->nice_match; /* stop if match long enough */
1385 IPos limit = s->strstart > (IPos)MAX_DIST(s) ? 1385 IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
@@ -1394,13 +1394,13 @@ local uInt longest_match(deflate_state *s, IPos cur_match) {
1394 /* Compare two bytes at a time. Note: this is not always beneficial. 1394 /* Compare two bytes at a time. Note: this is not always beneficial.
1395 * Try with and without -DUNALIGNED_OK to check. 1395 * Try with and without -DUNALIGNED_OK to check.
1396 */ 1396 */
1397 register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; 1397 Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
1398 register ush scan_start = *(ushf*)scan; 1398 ush scan_start = *(ushf*)scan;
1399 register ush scan_end = *(ushf*)(scan + best_len - 1); 1399 ush scan_end = *(ushf*)(scan + best_len - 1);
1400#else 1400#else
1401 register Bytef *strend = s->window + s->strstart + MAX_MATCH; 1401 Bytef *strend = s->window + s->strstart + MAX_MATCH;
1402 register Byte scan_end1 = scan[best_len - 1]; 1402 Byte scan_end1 = scan[best_len - 1];
1403 register Byte scan_end = scan[best_len]; 1403 Byte scan_end = scan[best_len];
1404#endif 1404#endif
1405 1405
1406 /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. 1406 /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
@@ -1524,10 +1524,10 @@ local uInt longest_match(deflate_state *s, IPos cur_match) {
1524 * Optimized version for FASTEST only 1524 * Optimized version for FASTEST only
1525 */ 1525 */
1526local uInt longest_match(deflate_state *s, IPos cur_match) { 1526local uInt longest_match(deflate_state *s, IPos cur_match) {
1527 register Bytef *scan = s->window + s->strstart; /* current string */ 1527 Bytef *scan = s->window + s->strstart; /* current string */
1528 register Bytef *match; /* matched string */ 1528 Bytef *match; /* matched string */
1529 register int len; /* length of current match */ 1529 int len; /* length of current match */
1530 register Bytef *strend = s->window + s->strstart + MAX_MATCH; 1530 Bytef *strend = s->window + s->strstart + MAX_MATCH;
1531 1531
1532 /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. 1532 /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
1533 * It is easy to get rid of this optimization if necessary. 1533 * It is easy to get rid of this optimization if necessary.
diff --git a/trees.c b/trees.c
index 52024140..68d3bfaa 100644
--- a/trees.c
+++ b/trees.c
@@ -152,7 +152,7 @@ local TCONST static_tree_desc static_bl_desc =
152 * IN assertion: 1 <= len <= 15 152 * IN assertion: 1 <= len <= 15
153 */ 153 */
154local unsigned bi_reverse(unsigned code, int len) { 154local unsigned bi_reverse(unsigned code, int len) {
155 register unsigned res = 0; 155 unsigned res = 0;
156 do { 156 do {
157 res |= code & 1; 157 res |= code & 1;
158 code >>= 1, res <<= 1; 158 code >>= 1, res <<= 1;