Bug 431950 - disable scary-but-harmless zlib trace warnings in debug builds. r=bholley
authorJustin Dolske <dolske@mozilla.com>
Sun, 13 Sep 2009 13:26:31 -0700
changeset 32442 7c3025d9dc5f2f3a132dd30b1f048a7399f7ad6e
parent 32441 27a16698706c100feb652783f981b3fd7c161c5b
child 32443 b971fc15e6e650219170cde08fd2d0bb4c2d4e73
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs431950
milestone1.9.3a1pre
Bug 431950 - disable scary-but-harmless zlib trace warnings in debug builds. r=bholley
modules/zlib/src/ChangeLog.moz
modules/zlib/src/zutil.h
--- a/modules/zlib/src/ChangeLog.moz
+++ b/modules/zlib/src/ChangeLog.moz
@@ -34,8 +34,11 @@ Mozilla.org changes:
   (keeping '#include "mozzconf.h"' in zconf.h)
   See bugs #299445 and #300349
 
 - 24 July 2005
   Added treatment of HAVE_VISIBILITY_PRAGMA in mozzconf.h
 
 - 24 July 2005
   Updated zlib.def with new symbols in zlib version 1.2.3
+
+- 13 September 2009
+  Don't enable zlib's debug output when the Mozilla build is in debug mode (bug 431950)
--- a/modules/zlib/src/zutil.h
+++ b/modules/zlib/src/zutil.h
@@ -233,16 +233,21 @@ extern const char * const z_errmsg[10]; 
 #    define zmemzero(dest, len) memset(dest, 0, len)
 #  endif
 #else
    extern void zmemcpy  OF((Bytef* dest, const Bytef* source, uInt len));
    extern int  zmemcmp  OF((const Bytef* s1, const Bytef* s2, uInt len));
    extern void zmemzero OF((Bytef* dest, uInt len));
 #endif
 
+/* Ignore the Mozilla build env's DEBUG unless ZLIB_DEBUG is also set */
+#ifndef ZLIB_DEBUG
+#undef DEBUG
+#endif
+
 /* Diagnostic functions */
 #ifdef DEBUG
 #  include <stdio.h>
    extern int z_verbose;
    extern void z_error    OF((char *m));
 #  define Assert(cond,msg) {if(!(cond)) z_error(msg);}
 #  define Trace(x) {if (z_verbose>=0) fprintf x ;}
 #  define Tracev(x) {if (z_verbose>0) fprintf x ;}