]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed pointer conversion warnings (C++)
authorYann Collet <cyan@fb.com>
Fri, 3 Feb 2017 16:43:06 +0000 (08:43 -0800)
committerYann Collet <cyan@fb.com>
Fri, 3 Feb 2017 16:43:06 +0000 (08:43 -0800)
in gz module

programs/fileio.c

index 5b9c91bc49f2b8be373be8638d74c99a6a9cef10..a9e1574a6fd07a7fba42aa85c3fd5f7471aebde6 100644 (file)
@@ -742,7 +742,7 @@ static unsigned long long FIO_decompressGzFrame(dRess_t* ress, FILE* srcFile, co
     strm.avail_in = Z_NULL;
     if (inflateInit2(&strm, 15 /* maxWindowLogSize */ + 16 /* gzip only */) != Z_OK) return 0;  /* see http://www.zlib.net/manual.html */
 
-    strm.next_out = ress->dstBuffer;
+    strm.next_out = (Bytef*)ress->dstBuffer;
     strm.avail_out = (uInt)ress->dstBufferSize;
     strm.avail_in = (uInt)ress->srcBufferLoaded;
     strm.next_in = (z_const unsigned char*)ress->srcBuffer;
@@ -761,7 +761,7 @@ static unsigned long long FIO_decompressGzFrame(dRess_t* ress, FILE* srcFile, co
             if (decompBytes) {
                 if (fwrite(ress->dstBuffer, 1, decompBytes, ress->dstFile) != decompBytes) EXM_THROW(31, "Write error : cannot write to output file");
                 outFileSize += decompBytes;
-                strm.next_out = ress->dstBuffer;
+                strm.next_out = (Bytef*)ress->dstBuffer;
                 strm.avail_out = (uInt)ress->dstBufferSize;
             }
         }