65fa5e
From f776e1609cc63bf486634ee9bc6226dac2c0d2f3 Mon Sep 17 00:00:00 2001
65fa5e
From: Ondrej Dubaj <odubaj@redhat.com>
65fa5e
Date: Tue, 15 Oct 2019 11:27:15 +0200
65fa5e
Subject: [PATCH] fixed covscan issues
65fa5e
65fa5e
---
65fa5e
 crc32.c           | 2 +-
65fa5e
 deflate.c         | 2 +-
65fa5e
 test/crc32_test.c | 8 ++++----
65fa5e
 3 files changed, 6 insertions(+), 6 deletions(-)
65fa5e
65fa5e
diff --git a/crc32.c b/crc32.c
65fa5e
index 406d350..34132ea 100644
65fa5e
--- a/crc32.c
65fa5e
+++ b/crc32.c
65fa5e
@@ -302,7 +302,7 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
65fa5e
 
65fa5e
     if (!crc32_func)
65fa5e
         crc32_func = crc32_z_ifunc();
65fa5e
-        return (*crc32_func)(crc, buf, len);
65fa5e
+    return (*crc32_func)(crc, buf, len);
65fa5e
 }
65fa5e
 
65fa5e
 #endif /* defined(Z_IFUNC_ASM) || defined(Z_IFUNC_NATIVE) */
65fa5e
diff --git a/deflate.c b/deflate.c
65fa5e
index 089285a..9b09718 100644
65fa5e
--- a/deflate.c
65fa5e
+++ b/deflate.c
65fa5e
@@ -1015,7 +1015,7 @@ int ZEXPORT deflate (strm, flush)
65fa5e
      */
65fa5e
     if (strm->avail_in != 0 || s->lookahead != 0 ||
65fa5e
         (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
65fa5e
-        block_state bstate;
65fa5e
+        block_state bstate = 0;
65fa5e
 
65fa5e
         bstate = DEFLATE_HOOK(strm, flush, &bstate) ? bstate :
65fa5e
                  s->level == 0 ? deflate_stored(s, flush) :
65fa5e
diff --git a/test/crc32_test.c b/test/crc32_test.c
65fa5e
index 5d73128..2d2a6c7 100644
65fa5e
--- a/test/crc32_test.c
65fa5e
+++ b/test/crc32_test.c
65fa5e
@@ -11,25 +11,25 @@
65fa5e
 #  include <stdlib.h>
65fa5e
 #endif
65fa5e
 
65fa5e
-void test_crc32  OF((uLong crc, Byte* buf, z_size_t len, uLong chk, int line));
65fa5e
+void test_crc32  OF((uLong crc, char* buf, z_size_t len, uLong chk, int line));
65fa5e
 int main         OF((void));
65fa5e
 
65fa5e
 typedef struct {
65fa5e
     int line;
65fa5e
 	uLong crc;
65fa5e
-    Byte* buf;
65fa5e
+    char* buf;
65fa5e
 	int len;
65fa5e
     uLong expect;
65fa5e
 } crc32_test;
65fa5e
 
65fa5e
 void test_crc32(crc, buf, len, chk, line)
65fa5e
     uLong crc;
65fa5e
-    Byte *buf;
65fa5e
+    char *buf;
65fa5e
     z_size_t len;
65fa5e
     uLong chk;
65fa5e
     int line;
65fa5e
 {
65fa5e
-    uLong res = crc32(crc, buf, len);
65fa5e
+    uLong res = crc32(crc, (Bytef *) buf, len);
65fa5e
 	if (res != chk) {
65fa5e
         fprintf(stderr, "FAIL [%d]: crc32 returned 0x%08X expected 0x%08X\n",
65fa5e
                 line, (unsigned int)res, (unsigned int)chk);
65fa5e
-- 
65fa5e
2.19.1
65fa5e