[cvs] bogofilter/src error.c,1.1,1.2 html.c,1.10,1.11 maint.c,1.11,1.12 register.c,1.5,1.6
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
From: <m-...@us...> - 2003-03-10 05:06:31
|
Update of /cvsroot/bogofilter/bogofilter/src In directory sc8-pr-cvs1:/tmp/cvs-serv2178 Modified Files: error.c html.c maint.c register.c Log Message: Format string/argument fixes. Index: error.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/error.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- error.c 3 Feb 2003 16:55:14 -0000 1.1 +++ error.c 10 Mar 2003 05:06:28 -0000 1.2 @@ -35,7 +35,8 @@ vsnprintf( message, sizeof(message), format, ap ); va_end (ap); - fprintf( stderr, "%s: %s\n", progname, message ); + fprintf(stderr, "%s: %s\n", progname, message); if (logflag) - syslog( LOG_INFO, "[%u] %s:%lu: %s", pid, file, line, message ); + syslog(LOG_INFO, "[%lu] %s:%lu: %s", (unsigned long)pid, + file, line, message ); } Index: html.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/html.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- html.c 5 Mar 2003 00:07:13 -0000 1.10 +++ html.c 10 Mar 2003 05:06:28 -0000 1.11 @@ -58,7 +58,8 @@ } if (buff->t.leng != (size_t)(buf_used - buf_start)) { - fprintf(dbgout, "incorrect count: %d != %d\n", buff->t.leng, (size_t)(buf_used - buf_start)); + fprintf(dbgout, "incorrect count: %ld != %ld\n", + (long)buff->t.leng, (long)(buf_used - buf_start)); exit(2); } Index: maint.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/maint.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- maint.c 8 Mar 2003 04:32:53 -0000 1.11 +++ maint.c 10 Mar 2003 05:06:28 -0000 1.12 @@ -71,7 +71,10 @@ bool keep_count(uint32_t count) { bool ok = count > thresh_count; - if (count > 0 && DEBUG_DATABASE(1)) fprintf(dbgout, "keep_count: %d > %d -> %c\n", count, thresh_count, ok ? 't' : 'f' ); + if (count > 0 && DEBUG_DATABASE(1)) + fprintf(dbgout, "keep_count: %lu > %lu -> %c\n", + (unsigned long)count, (unsigned long)thresh_count, + ok ? 't' : 'f' ); return ok; } @@ -82,7 +85,9 @@ return true; else { bool ok = thresh_date < date; - if (DEBUG_DATABASE(1)) fprintf(dbgout, "keep_date: %d < %d -> %c\n", (int) thresh_date, date, ok ? 't' : 'f' ); + if (DEBUG_DATABASE(1)) + fprintf(dbgout, "keep_date: %ld < %ld -> %c\n", + (long)thresh_date, (long)date, ok ? 't' : 'f' ); return ok; } } @@ -142,7 +147,7 @@ } static int maintain_hook(word_t *key, word_t *data, - void *userdata /*@unused@*/) + /*@unused@*/ void *userdata) { word_t w; dbv_t val; Index: register.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/register.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- register.c 5 Mar 2003 22:05:24 -0000 1.5 +++ register.c 10 Mar 2003 05:06:28 -0000 1.6 @@ -60,7 +60,8 @@ if (_run_type & UNREG_SPAM) decr_list = spam_list; if (DEBUG_REGISTER(2)) - fprintf(dbgout, "%s%s -- incr: %08X, decr: %08X\n", r, u, (int)incr_list, (int)decr_list); + fprintf(dbgout, "%s%s -- incr: %08lX, decr: %08lX\n", r, u, + (unsigned long)incr_list, (unsigned long)decr_list); if (incr_list) incr_list->active = true; |