]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fixed GCC warning about unused variable in longest_match.
authorNathan Moinvaziri <nathan@nathanm.com>
Mon, 24 Jan 2022 04:15:40 +0000 (20:15 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Tue, 25 Jan 2022 11:18:22 +0000 (12:18 +0100)
match_tpl.h:47:13: warning: unused variable â€˜scan_start’ [-Wunused-variable]
   47 |     uint8_t scan_start[8], scan_end[8];

match_tpl.h

index 94e796b55e82d589d5e91aa564c729e8c2687a90..853a4ad32ffec4f9f5a5466ef5aa69ec077a4e84 100644 (file)
@@ -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) \