From: Mat Berchtold Date: Thu, 29 Oct 2015 14:38:40 +0000 (+0100) Subject: fix macro for msvc X-Git-Tag: 1.9.9-b1~793^2~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3dedfeb0978fe184afc141cf0b34aba37ae70d90;p=thirdparty%2Fzlib-ng.git fix macro for msvc --- diff --git a/deflate.h b/deflate.h index 107bb4276..fedb29eac 100644 --- a/deflate.h +++ b/deflate.h @@ -387,8 +387,8 @@ void ZLIB_INTERNAL bi_windup(deflate_state *s); * previous key instead of complete recalculation each time. */ #ifdef X86_SSE4_2_CRC_HASH -#define UPDATE_HASH(s, h, i) (\ - {\ +#define UPDATE_HASH(s, h, i) \ + do {\ if (s->level < 6) \ h = (3483 * (s->window[i]) +\ 23081* (s->window[i+1]) +\ @@ -398,7 +398,7 @@ void ZLIB_INTERNAL bi_windup(deflate_state *s); h = (25881* (s->window[i]) +\ 24674* (s->window[i+1]) +\ 25811* (s->window[i+2])) & s->hash_mask;\ - }) + } while (0) #else # define UPDATE_HASH(s, h, i) (h = (((h) << s->hash_shift) ^ (s->window[i + (MIN_MATCH-1)])) & s->hash_mask) #endif