compile error with 0.16.4

David Relson relson at osagesoftware.com
Tue Mar 9 21:00:38 CET 2004


On Tue, 09 Mar 2004 18:54:54 +0100
Joerg Over Dexia wrote:

> I believe that has been mentioned before... but I can't find a
> way to search the archives.
> When I try to compile bogofilter 0.16.4 (configured with
> --enable-deprecated-code) I get the following error:
> 
> bogoutil.c: In function `display_words':
> bogoutil.c:338: `spam_msg_count' undeclared (first use in this
> function)
> bogoutil.c:338: (Each undeclared identifier is reported only once
> bogoutil.c:338: for each function it appears in.)
> bogoutil.c:339: `good_msg_count' undeclared (first use in this
> function)
> bogoutil.c:363: warning: division: NaN - producing operation
> 
> How do I declare those values not breaking anything?
> 
> Thx in advance, JO

Joerg,

Using 0.15.13 for reference, the fix appears to be what's shown below. 
May I ask why you need the deprecated code?  It's been removed from
0.17.0 and subsequent releases.

David


[relson at osage src]$ diff -u bogoutil.c.1.91 bogoutil.c
--- bogoutil.c.1.91	2004-01-21 21:13:16.000000000 -0500
+++ bogoutil.c	2004-03-09 14:58:22.000000000 -0500
@@ -335,8 +335,8 @@
 	else
 	{
 #ifdef	ENABLE_DEPRECATED_CODE
-	    double spamness = (double) spam_count / (double) spam_msg_count;
-	    double goodness = (double) good_count / (double) good_msg_count;
+	    double spamness = (double) spam_count / (double) spam_msgs;
+	    double goodness = (double) good_count / (double) good_msgs;
 
 	    gra_prob = (spam_count + good_count <= MINIMUM_FREQ)
 		? UNKNOWN_WORD




More information about the Bogofilter mailing list