From: Nathan Moinvaziri Date: Mon, 24 Jan 2022 04:15:40 +0000 (-0800) Subject: Fixed GCC warning about unused variable in longest_match. X-Git-Tag: 2.1.0-beta1~420 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87f2ae3f4918e856fff289357db2682b1691c37c;p=thirdparty%2Fzlib-ng.git Fixed GCC warning about unused variable in longest_match. match_tpl.h:47:13: warning: unused variable ‘scan_start’ [-Wunused-variable] 47 | uint8_t scan_start[8], scan_end[8]; --- diff --git a/match_tpl.h b/match_tpl.h index 94e796b55..853a4ad32 100644 --- a/match_tpl.h +++ b/match_tpl.h @@ -44,7 +44,10 @@ Z_INTERNAL uint32_t LONGEST_MATCH(deflate_state *const s, Pos cur_match) { uint32_t chain_length, nice_match, best_len, offset; uint32_t lookahead = s->lookahead; Pos match_offset = 0; - uint8_t scan_start[8], scan_end[8]; +#ifdef UNALIGNED_OK + uint8_t scan_start[8]; +#endif + uint8_t scan_end[8]; #define GOTO_NEXT_CHAIN \ if (--chain_length && (cur_match = prev[cur_match & wmask]) > limit) \