From 8127acfbbc67484f057a319dc6afd52d8184b850 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 11 Apr 2017 16:40:17 +0100 Subject: [PATCH] [Minor] Properly show warning --- src/libstat/classifiers/bayes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libstat/classifiers/bayes.c b/src/libstat/classifiers/bayes.c index cf1f35e6e..2aa15eee9 100644 --- a/src/libstat/classifiers/bayes.c +++ b/src/libstat/classifiers/bayes.c @@ -337,12 +337,12 @@ bayes_classify (struct rspamd_classifier * ctx, rspamd_mempool_set_variable (task->task_pool, "bayes_prob", pprob, NULL); if (ctx->cfg->min_tokens > 0 && - cl.text_tokens < ctx->cfg->min_tokens * 0.1) { + cl.text_tokens < (gint)(ctx->cfg->min_tokens * 0.1)) { msg_info_bayes ("ignore bayes probability %.2f since we have " - "too few text tokens: %uL, at least %.0f is required", + "too few text tokens: %uL, at least %d is required", final_prob, cl.text_tokens, - ctx->cfg->min_tokens * 0.1); + (gint)(ctx->cfg->min_tokens * 0.1)); return TRUE; } -- 2.39.5