diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-08-04 20:31:24 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-08-04 20:31:24 +0400 |
commit | 3f96e6a7a317e70b85b32de4aa06681c11d79006 (patch) | |
tree | 70343e3fb1a43d29d9c4f454fa47b2dcad6249ad /src/classifiers | |
parent | 6b86782ce21caad081d41f54ef10233a8e757189 (diff) | |
download | rspamd-3f96e6a7a317e70b85b32de4aa06681c11d79006.tar.gz rspamd-3f96e6a7a317e70b85b32de4aa06681c11d79006.zip |
Fix signness in arithmetic operations.
Diffstat (limited to 'src/classifiers')
-rw-r--r-- | src/classifiers/bayes.c | 8 | ||||
-rw-r--r-- | src/classifiers/classifiers.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/classifiers/bayes.c b/src/classifiers/bayes.c index 15a50b2da..bf7e4d9d4 100644 --- a/src/classifiers/bayes.c +++ b/src/classifiers/bayes.c @@ -110,7 +110,7 @@ bayes_classify_callback (gpointer key, gpointer value, gpointer data) token_node_t *node = key; struct bayes_callback_data *cd = data; double renorm = 0; - gint i; + guint i; double local_hits = 0; struct bayes_statfile_data *cur; @@ -183,7 +183,7 @@ bayes_classify (struct classifier_ctx* ctx, statfile_pool_t *pool, GTree *input, struct bayes_callback_data data; gchar *value; gint nodes, i = 0, cnt, best_num = 0; - gsize minnodes; + gint minnodes; guint64 rev, total_learns = 0; double best = 0; struct statfile *st; @@ -287,7 +287,7 @@ bayes_learn (struct classifier_ctx* ctx, statfile_pool_t *pool, const char *symb struct bayes_callback_data data; gchar *value; gint nodes; - gsize minnodes; + gint minnodes; struct statfile *st, *sel_st = NULL; stat_file_t *to_learn; GList *cur; @@ -387,7 +387,7 @@ bayes_learn_spam (struct classifier_ctx* ctx, statfile_pool_t *pool, struct bayes_callback_data data; gchar *value; gint nodes; - gsize minnodes; + gint minnodes; struct statfile *st; stat_file_t *file; GList *cur; diff --git a/src/classifiers/classifiers.c b/src/classifiers/classifiers.c index d745a4d9d..85c018701 100644 --- a/src/classifiers/classifiers.c +++ b/src/classifiers/classifiers.c @@ -50,7 +50,7 @@ struct classifier classifiers[] = { struct classifier * get_classifier (char *name) { - int i; + guint i; for (i = 0; i < sizeof (classifiers) / sizeof (classifiers[0]); i++) { if (strcmp (classifiers[i].name, name) == 0) { |