You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2007/01/09 23:07:55 UTC
svn commit: r494616 - /spamassassin/trunk/spamc/libspamc.c
Author: jm
Date: Tue Jan 9 14:07:55 2007
New Revision: 494616
URL: http://svn.apache.org/viewvc?view=rev&rev=494616
Log:
add note for extra-warning compilation, and fix a bug found by that commandline regarding ISO C90 compatibility of the C zlib code
Modified:
spamassassin/trunk/spamc/libspamc.c
Modified: spamassassin/trunk/spamc/libspamc.c
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamc/libspamc.c?view=diff&rev=494616&r1=494615&r2=494616
==============================================================================
--- spamassassin/trunk/spamc/libspamc.c (original)
+++ spamassassin/trunk/spamc/libspamc.c Tue Jan 9 14:07:55 2007
@@ -16,6 +16,13 @@
* </...@LICENSE>
*/
+/*
+ Compile with extra warnings -- gcc only, not suitable for use as default:
+
+ gcc -Wextra -Wdeclaration-after-statement -Wall -g -O2 spamc/spamc.c \
+ spamc/getopt.c spamc/libspamc.c spamc/utils.c -o spamc/spamc -ldl -lz
+ */
+
#include "config.h"
#include "libspamc.h"
#include "utils.h"
@@ -1017,6 +1024,9 @@
return EX_SOFTWARE;
#else
+ z_stream strm;
+
+ UNUSED_VARIABLE(flags);
/* worst-case, according to http://www.zlib.org/zlib_tech.html ;
* same as input, plus 5 bytes per 16k, plus 6 bytes. this should
@@ -1027,7 +1037,6 @@
return EX_OSERR;
}
- z_stream strm;
strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
strm.opaque = Z_NULL;