From: Vsevolod Stakhov Date: Tue, 11 Apr 2017 15:40:17 +0000 (+0100) Subject: [Minor] Properly show warning X-Git-Tag: 1.5.6~29 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8127acfbbc67484f057a319dc6afd52d8184b850;p=rspamd.git [Minor] Properly show warning --- 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; }