]> git.lizzy.rs Git - zlib.git/commitdiff
Add warnings when compiling with assembler code.
authorMark Adler <madler@alumni.caltech.edu>
Tue, 3 Jan 2017 01:25:27 +0000 (17:25 -0800)
committerMark Adler <madler@alumni.caltech.edu>
Tue, 3 Jan 2017 01:28:27 +0000 (17:28 -0800)
There have been many reports of bugs in the assembler codes
intended to speed up deflate and inflate. They are third-party
contributions in contrib, and so are not supported by the zlib
maintainers.

deflate.c
inffast.c

index 7817530835f5283a8b496ff5e5b1b383ad523ae2..9161f296a4639ce8a7b4852a8cc203b59f3c5208 100644 (file)
--- a/deflate.c
+++ b/deflate.c
@@ -88,6 +88,7 @@ local void putShortMSB    OF((deflate_state *s, uInt b));
 local void flush_pending  OF((z_streamp strm));
 local unsigned read_buf   OF((z_streamp strm, Bytef *buf, unsigned size));
 #ifdef ASMV
+#  pragma message("Assembler code may have bugs -- use at your own risk")
       void match_init OF((void)); /* asm code initialization */
       uInt longest_match  OF((deflate_state *s, IPos cur_match));
 #else
index a15876d4e44d75a56641748f12228854d0a5176f..29eb7d8244ae80d689ad7ed4a71ec275c1d64dd6 100644 (file)
--- a/inffast.c
+++ b/inffast.c
@@ -8,7 +8,9 @@
 #include "inflate.h"
 #include "inffast.h"
 
-#ifndef ASMINF
+#ifdef ASMINF
+#  pragma message("Assembler code may have bugs -- use at your own risk")
+#else
 
 /*
    Decode literal, length, and distance codes and write out the resulting