]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fixed conversion from unsigned int to short warning in slide_hash_sse2 and slide_hash...
authorNathan Moinvaziri <nathan@nathanm.com>
Sat, 4 Jul 2020 03:28:33 +0000 (20:28 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 14 Aug 2020 20:20:50 +0000 (22:20 +0200)
    slide_sse.c(20,51): warning C4244: 'function': conversion from 'unsigned int' to 'short', possible loss of data
    slide_avx.c(21,54): warning C4244: 'function': conversion from 'unsigned int' to 'short', possible loss of data

arch/x86/slide_avx.c
arch/x86/slide_sse.c

index 3157ceeb72ef2620e8c477c71eda7e123e093c36..7ed7c029185008c61b25a7514cff91069feb01c4 100644 (file)
@@ -18,7 +18,7 @@ ZLIB_INTERNAL void slide_hash_avx2(deflate_state *s) {
     Pos *p;
     unsigned n;
     unsigned wsize = s->w_size;
-    const __m256i zmm_wsize = _mm256_set1_epi16(wsize);
+    const __m256i zmm_wsize = _mm256_set1_epi16((uint16_t)wsize);
 
     n = s->hash_size;
     p = &s->head[n] - 16;
index c7d3b124975ec643dd30cb3b446ff9b31597e986..f012e04fa57eedd3bb4b5f871d7af82eaf47c490 100644 (file)
@@ -17,7 +17,7 @@ ZLIB_INTERNAL void slide_hash_sse2(deflate_state *s) {
     Pos *p;
     unsigned n;
     unsigned wsize = s->w_size;
-    const __m128i xmm_wsize = _mm_set1_epi16(wsize);
+    const __m128i xmm_wsize = _mm_set1_epi16((uint16_t)wsize);
 
     n = s->hash_size;
     p = &s->head[n] - 8;