]> source.dussan.org Git - rspamd.git/commitdiff
Fix format issues found by static analysis
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 11 Nov 2015 18:00:43 +0000 (18:00 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 11 Nov 2015 18:00:43 +0000 (18:00 +0000)
26 files changed:
src/client/rspamc.c
src/controller.c
src/fuzzy_storage.c
src/libmime/images.c
src/libmime/mime_expressions.c
src/libmime/smtp_utils.c
src/libserver/cfg_rcl.c
src/libserver/cfg_utils.c
src/libserver/dns.c
src/libserver/fuzzy_backend.c
src/libserver/protocol.c
src/libserver/spf.c
src/libserver/task.c
src/libstat/stat_process.c
src/libstat/tokenizers/osb.c
src/libstat/tokenizers/tokenizers.c
src/libutil/addr.c
src/libutil/logger.c
src/libutil/map.c
src/libutil/radix.c
src/libutil/rrd.c
src/libutil/util.c
src/lua/lua_common.c
src/lua/lua_xmlrpc.c
src/plugins/fuzzy_check.c
src/rspamadm/pw.c

index dba246e1f1a19adf9fb50195496f09bebf76fa19..9cbab44a3664f064b5a2c2105a41549ed285b3aa 100644 (file)
@@ -606,7 +606,7 @@ rspamc_uptime_output (FILE *out, ucl_object_t *obj)
                }
                /* If uptime is less than 1 minute print only seconds */
                else if (seconds / 60 == 0) {
-                       rspamd_printf ("%L second%s\n", (gint)seconds,
+                       rspamd_printf ("%L second%s\n", seconds,
                                (gint)seconds > 1 ? "s" : "");
                }
                /* Else print the minutes and seconds. */
index 98488a5e9845eecd0244b83fb907528d304c6fce..39312f48c8a12bf1e28e48b081ef48387226aba3 100644 (file)
@@ -1688,7 +1688,7 @@ rspamd_controller_handle_savemap (struct rspamd_http_connection_entry *conn_ent,
        }
 
        if (!found) {
-               msg_info_session ("map not found: %d", id);
+               msg_info_session ("map not found: %L", id);
                rspamd_controller_send_error (conn_ent, 404, "Map id not found");
                return 0;
        }
index 8c870b090f54966882ac1aa0c8a339e4e67fa7eb..0a3ab89afc86d6437dc82291e32307d46f1f8ca5 100644 (file)
@@ -470,7 +470,7 @@ accept_fuzzy_socket (gint fd, short what, void *arg)
                        else {
                                /* Discard input */
                                server_stat->fuzzy_hashes_checked[RSPAMD_FUZZY_EPOCH6]++;
-                               msg_debug ("invalid fuzzy command of size %d received", r);
+                               msg_debug ("invalid fuzzy command of size %z received", r);
                        }
 
                        REF_RELEASE (session);
index f55e47d7a7952c1e7846fa0e01be0dfd57204732..1fdb38151424c347bdc49417ccee204737e85358 100644 (file)
@@ -90,7 +90,7 @@ process_png_image (struct rspamd_task *task, GByteArray *data)
        guint8 *p;
 
        if (data->len < 24) {
-               msg_info_task ("bad png detected (maybe striped): <%s>", task->message_id);
+               msg_info_task ("bad png detected (maybe striped)");
                return NULL;
        }
 
@@ -98,7 +98,7 @@ process_png_image (struct rspamd_task *task, GByteArray *data)
        /* Skip signature and read header section */
        p = data->data + 12;
        if (memcmp (p, "IHDR", 4) != 0) {
-               msg_info_task ("png doesn't begins with IHDR section", task->message_id);
+               msg_info_task ("png doesn't begins with IHDR section");
                return NULL;
        }
 
@@ -154,7 +154,7 @@ process_gif_image (struct rspamd_task *task, GByteArray *data)
        guint16 t;
 
        if (data->len < 10) {
-               msg_info_task ("bad gif detected (maybe striped): <%s>", task->message_id);
+               msg_info_task ("bad gif detected (maybe striped)");
                return NULL;
        }
 
@@ -179,7 +179,7 @@ process_bmp_image (struct rspamd_task *task, GByteArray *data)
        guint8 *p;
 
        if (data->len < 28) {
-               msg_info_task ("bad bmp detected (maybe striped): <%s>", task->message_id);
+               msg_info_task ("bad bmp detected (maybe striped)");
                return NULL;
        }
 
index d5b38437d899595be155c67cbc8420e225b8adc3..89def6af7670388f3faacaadcf191ec070b44e60 100644 (file)
@@ -778,7 +778,7 @@ tree_url_callback (gpointer key, gpointer value, void *data)
 
        if (G_UNLIKELY (param->re->is_test)) {
                msg_info_task ("process test regexp %s for url %s returned FALSE",
-                       struri (url));
+                       param->re->regexp_text, struri (url));
        }
 }
 
index 32b23bfd78a6d4878331d2b1c1d2b3585fe3573c..0f8a84cc27e8d41d9735362d143bd6e19a3034d1 100644 (file)
@@ -225,9 +225,8 @@ make_smtp_tempfile (struct smtp_session *session)
        session->temp_name = rspamd_mempool_alloc (session->pool, r);
        rspamd_snprintf (session->temp_name,
                r,
-               "%s%crspamd-XXXXXX",
-               session->cfg->temp_dir,
-               G_DIR_SEPARATOR);
+               "%s/rspamd-XXXXXX",
+               session->cfg->temp_dir);
 #ifdef HAVE_MKSTEMP
        /* Umask is set before */
        session->temp_fd = mkstemp (session->temp_name);
index b42f2241c214fe8c752f4a17c05964f8fae5ddb5..42830d7003401de4e65c0621bfb7ab99203a31f3 100644 (file)
@@ -2186,7 +2186,8 @@ rspamd_rcl_parse_struct_keypair (rspamd_mempool_t *pool,
                rspamd_snprintf (keybuf, sizeof (keybuf), "%s%s", sk, pk);
        }
        else {
-               rspamd_snprintf (keybuf, sizeof (keybuf), "%*s%s", sem - sk, sk, pk);
+               rspamd_snprintf (keybuf, sizeof (keybuf), "%*s%s", (gint)(sem - sk),
+                               sk, pk);
        }
 
        key = rspamd_http_connection_make_key (keybuf, strlen (keybuf));
index 0a0926b6e38dc17775c0799762c8de184ac12a60..65317b9cdf867a6a86cf34f6912a9855e6043d62 100644 (file)
@@ -1202,7 +1202,8 @@ rspamd_config_add_metric_symbol (struct rspamd_config *cfg,
 
        if (g_hash_table_lookup (cfg->metrics_symbols, symbol) != NULL &&
                        !rewrite_existing) {
-               msg_debug_config ("symbol %s has been already registered, do not override");
+               msg_debug_config ("symbol %s has been already registered, do not override",
+                               symbol);
                return FALSE;
        }
 
index 0df6ddd918cbbaf494c380ae0103820aaca27d26..0550ef7c240593d049a1989a825d9a8c55b7a405 100644 (file)
@@ -215,7 +215,7 @@ dns_resolver_init (rspamd_logger_t *logger,
                                priority = strtoul (p, &err, 10);
                                if (err != NULL && *err != '\0') {
                                        msg_info_config (
-                                               "bad character '%x', must be 'm' or 's' or a numeric priority",
+                                               "bad character '%xc', must be 'm' or 's' or a numeric priority",
                                                *err);
                                }
                        }
index fd1f9e4d0e68fbbb7871c46d07b461af165d52f3..696c9487ba02838a6aa788dceff1d0d1ff3c9a19 100644 (file)
@@ -503,7 +503,7 @@ rspamd_fuzzy_backend_check (struct rspamd_fuzzy_backend *backend,
                        else {
                                shingle_values[i] = -1;
                        }
-                       msg_debug_fuzzy_backend ("looking for shingle %d -> %L: %d", i,
+                       msg_debug_fuzzy_backend ("looking for shingle %L -> %L: %d", i,
                                        shcmd->sgl.hashes[i], rc);
                }
                rspamd_fuzzy_backend_cleanup_stmt (backend,
@@ -638,7 +638,7 @@ rspamd_fuzzy_backend_add (struct rspamd_fuzzy_backend *backend,
                                                rspamd_fuzzy_backend_run_stmt (backend,
                                                                RSPAMD_FUZZY_BACKEND_INSERT_SHINGLE,
                                                                shcmd->sgl.hashes[i], i, id);
-                                               msg_debug_fuzzy_backend ("add shingle %d -> %L: %d",
+                                               msg_debug_fuzzy_backend ("add shingle %d -> %L: %L",
                                                                i,
                                                                shcmd->sgl.hashes[i],
                                                                id);
index 10bbbe2a5e9cb8f319b0082fefda1ccccd21405f..7e91f6a1ea43eeb8fa120bedf95faa38517a408b 100644 (file)
@@ -370,7 +370,7 @@ rspamd_protocol_handle_headers (struct rspamd_task *task,
                        IF_HEADER (RCPT_HEADER) {
                                if (!rspamd_task_add_recipient (task,
                                                rspamd_mempool_ftokdup (task->task_pool, hv_tok))) {
-                                       msg_err_task ("bad from header: '%V'", h->value);
+                                       msg_err_task ("bad from header: '%T'", h->value);
                                }
                                debug_task ("read rcpt header, value: %V", hv);
                        }
index f556362d129e49b545878fef18b727965b7ee975..30f87a12f9b16fd10120a4c33d05ec27c00a1df5 100644 (file)
@@ -1608,7 +1608,7 @@ start_spf_parse (struct spf_record *rec, struct spf_resolved_element *resolved,
                                "<%s>: spf error for domain %s: bad spf record version: %*s",
                                rec->task->message_id,
                                rec->sender_domain,
-                               sizeof (SPF_VER1_STR) - 1,
+                               (gint)sizeof (SPF_VER1_STR) - 1,
                                begin);
                return FALSE;
        }
index 584094e6e67a86bcb1f20b2370563c744fac448a..74266a88f9319525b95874751e3da07febb1153e 100644 (file)
@@ -340,7 +340,7 @@ rspamd_task_load_message (struct rspamd_task *task,
                task->msg.len = len;
 
                if (task->msg.len == 0) {
-                       msg_warn_task ("message has invalid message length: %ud",
+                       msg_warn_task ("message has invalid message length: %uz",
                                        task->msg.len);
                        g_set_error (&task->err, rspamd_task_quark(), RSPAMD_PROTOCOL_ERROR,
                                        "Invalid length");
@@ -350,7 +350,7 @@ rspamd_task_load_message (struct rspamd_task *task,
                if (task->flags & RSPAMD_TASK_FLAG_HAS_CONTROL) {
                        /* We have control chunk, so we need to process it separately */
                        if (task->msg.len < task->message_len) {
-                               msg_warn_task ("message has invalid message length: %ud and total len: %ud",
+                               msg_warn_task ("message has invalid message length: %ul and total len: %ul",
                                                task->message_len, task->msg.len);
                                g_set_error (&task->err, rspamd_task_quark(), RSPAMD_PROTOCOL_ERROR,
                                                "Invalid length");
@@ -495,7 +495,7 @@ rspamd_task_process (struct rspamd_task *task, guint stages)
                        task->processed_stages |= RSPAMD_TASK_STAGE_DONE;
                }
 
-               msg_debug_task ("task is processed", st);
+               msg_debug_task ("task is processed");
 
                return ret;
        }
index a1cbe9c33406685fdbb90258ff4cdb5d5a7961c6..b252d19c44a47495e1548221155ee23644d0dcd3 100644 (file)
@@ -330,8 +330,8 @@ preprocess_init_stat_token (gpointer k, gpointer v, gpointer d)
 
                                if (cl_runtime->clcf->max_tokens > 0 &&
                                                cl_runtime->processed_tokens > cl_runtime->clcf->max_tokens) {
-                                       msg_debug_task ("<%s> contains more tokens than allowed for %s classifier: "
-                                                       "%ud > %ud", cbdata->task, cl_runtime->clcf->name,
+                                       msg_debug_task ("message contains more tokens than allowed for %s classifier: "
+                                                       "%uL > %ud", cl_runtime->clcf->name,
                                                        cl_runtime->processed_tokens,
                                                        cl_runtime->clcf->max_tokens);
 
@@ -638,8 +638,8 @@ rspamd_stat_learn_token (gpointer k, gpointer v, gpointer d)
 
                                if (cl_runtime->clcf->max_tokens > 0 &&
                                                cl_runtime->processed_tokens > cl_runtime->clcf->max_tokens) {
-                                       msg_debug_task ("<%s> contains more tokens than allowed for %s classifier: "
-                                                       "%ud > %ud", cbdata->task, cl_runtime->clcf->name,
+                                       msg_debug_task ("message contains more tokens than allowed for %s classifier: "
+                                                       "%uL > %ud", cl_runtime->clcf->name,
                                                        cl_runtime->processed_tokens,
                                                        cl_runtime->clcf->max_tokens);
 
index 20fc6ece843859106422a84daabd40037361bfb6..cac8f707101bfbbb9c872187776a1ada2a96e74c 100644 (file)
@@ -125,7 +125,7 @@ rspamd_tokenizer_osb_config_from_ucl (rspamd_mempool_t * pool,
                                key = rspamd_decode_base32 (ucl_object_tostring (elt),
                                                0, &keylen);
                                if (keylen < sizeof (rspamd_sipkey_t)) {
-                                       msg_warn ("siphash key is too short: %s", keylen);
+                                       msg_warn ("siphash key is too short: %z", keylen);
                                        g_free (key);
                                }
                                else {
index 439c639a64fef8929afcb6206c6468d0ba92ad29..c86c286cc8709bd9d3b0bef2443b8ac64e4b502a 100644 (file)
@@ -259,7 +259,7 @@ rspamd_tokenizer_get_word (rspamd_ftok_t * buf,
                        break;
                case process_signature:
                        if (*p == '\r' || *p == '\n') {
-                               msg_debug ("signature found: %*s", siglen, sig);
+                               msg_debug ("signature found: %*s", (gint)siglen, sig);
                                return FALSE;
                        }
                        else if (*p != ' ' && *p != '-' && *p != '_') {
index 03947437891af305332cf59d0982abc362f8bca5..167bd8094f03b305531bd80c2ec2460855880e49 100644 (file)
@@ -930,7 +930,6 @@ rspamd_parse_host_port_priority_strv (gchar **tokens,
                        errno = ERANGE;
                        msg_warn ("cannot parse port: %s, error: %s",
                                        tokens[1],
-                                       *err_str,
                                        strerror (errno));
                        hints.ai_flags ^= AI_NUMERICSERV;
                }
index b83aa5cd6555a899eff48315f3a72be8787683a1..5f5d062d3211f05193e5b939351650ae604f6b98 100644 (file)
@@ -842,7 +842,7 @@ file_log_function (const gchar *log_domain,
                        mremain -= mr;
                }
                else {
-                       mr = rspamd_snprintf (m, mremain, ": ", function);
+                       mr = rspamd_snprintf (m, mremain, ": ");
                        m += mr;
                        mremain -= mr;
                }
index f9bd02ef90ecbc3a3b19e34577e4c2179bc51e4a..e8fb715b72aa5cee2c5852bd2d8cf72de03163f5 100644 (file)
@@ -903,7 +903,7 @@ rspamd_hosts_fin (rspamd_mempool_t * pool, struct map_cb_data *data)
                g_hash_table_destroy (data->prev_data);
        }
        if (data->cur_data) {
-               msg_info_pool ("read hash of %z elements", g_hash_table_size
+               msg_info_pool ("read hash of %d elements", g_hash_table_size
                                (data->cur_data));
        }
 }
@@ -932,7 +932,7 @@ rspamd_kv_list_fin (rspamd_mempool_t * pool, struct map_cb_data *data)
                g_hash_table_destroy (data->prev_data);
        }
        if (data->cur_data) {
-               msg_info_pool ("read hash of %z elements", g_hash_table_size
+               msg_info_pool ("read hash of %d elements", g_hash_table_size
                                (data->cur_data));
        }
 }
index 6d8530f76aa529448cd14582a51fbe02f28024f4..a6a49025a2c0664e4ee380723abf46717c04dfbb 100644 (file)
@@ -136,7 +136,7 @@ radix_find_compressed (radix_compressed_t * tree, guint8 *key, gsize keylen)
        while (node && kremain) {
                if (node->skipped) {
                        msg_debug_radix ("finding in the compressed node: %p at level %d",
-                               node->value, cur_level);
+                                       (gpointer)node->value, cur_level);
                        /* It is obviously a leaf node */
                        if (radix_compare_compressed (node, key, keylen, cur_level)) {
                                return node->value;
@@ -151,7 +151,7 @@ radix_find_compressed (radix_compressed_t * tree, guint8 *key, gsize keylen)
 
                msg_debug_radix ("finding value cur value: %p, left: %p, "
                                "right: %p, go %s, level: %d",
-                               node->value, node->d.n.left,
+                               (gpointer)node->value, node->d.n.left,
                                node->d.n.right, (kv & bit) ? "right" : "left",
                                cur_level);
                if (kv & bit) {
@@ -175,7 +175,7 @@ radix_find_compressed (radix_compressed_t * tree, guint8 *key, gsize keylen)
                /* We still have a node but no more key, so we can search for skipped node */
                if (node->skipped) {
                        msg_debug_radix ("finding in the compressed node: %p at level %d",
-                                       node->value, cur_level);
+                                       (gpointer)node->value, cur_level);
                        /* It is obviously a leaf node */
                        if (radix_compare_compressed (node, key, keylen, cur_level)) {
                                return node->value;
@@ -230,7 +230,7 @@ radix_uncompress_path (radix_compressed_t *tree,
                }
 
                msg_debug_radix ("uncompress path for node: %p, left: %p, "
-                               "right: %p, go %s", node->value, node->d.n.left,
+                               "right: %p, go %s", (gpointer)node->value, node->d.n.left,
                                node->d.n.right, (*nkey & bit) ? "right" : "left");
 
                bit >>= 1;
@@ -244,7 +244,7 @@ radix_uncompress_path (radix_compressed_t *tree,
 
        /* Attach leaf node, that was previously a compressed node */
        msg_debug_radix ("attach leaf node to %s with value %p", (*nkey & bit) ? "right" : "left",
-                       leaf->value);
+                       (gpointer)leaf->value);
        if (*nkey & bit) {
                node->d.n.right = leaf;
                node->d.n.left = NULL;
@@ -281,7 +281,7 @@ radix_make_leaf_node (radix_compressed_t *tree,
        }
        node->value = value;
        msg_debug_radix ("insert new leaf node with value %p to level %d",
-                       value, level);
+                       (gpointer)value, level);
 
        return node;
 }
@@ -322,13 +322,13 @@ radix_replace_node (radix_compressed_t *tree,
                oldval = node->value;
                node->value = value;
                msg_debug_radix ("replace value for leaf node with: %p, old value: %p",
-                               value, oldval);
+                               (gpointer)value, (gpointer)oldval);
        }
        else {
                oldval = node->value;
                node->value = value;
                msg_debug_radix ("replace value for node with: %p, old value: %p",
-                                                       value, oldval);
+                               (gpointer)value, (gpointer)oldval);
        }
 
        return oldval;
@@ -400,7 +400,8 @@ radix_uncompress_node (radix_compressed_t *tree,
                 * - otherwise we insert new compressed leaf node
                 */
                if (cur_level == target_level) {
-                       msg_debug_radix ("insert detached leaf node with value: %p", value);
+                       msg_debug_radix ("insert detached leaf node with value: %p",
+                                       (gpointer)value);
                        nnode->value = value;
                }
                else if (masked) {
@@ -415,8 +416,9 @@ radix_uncompress_node (radix_compressed_t *tree,
                                leaf = nnode->d.n.right;
                        }
                        msg_debug_radix ("move leaf node with value: %p, to level %ud, "
-                                       "set leaf node value to %p and level %ud", nnode->value,
-                                       cur_level, value, target_level);
+                                       "set leaf node value to %p and level %ud", (gpointer)nnode->value,
+                                       cur_level,
+                                       (gpointer)value, target_level);
                        radix_move_up_compressed_leaf (tree, leaf, nnode, value, key, keylen,
                                        target_level);
                }
@@ -456,7 +458,7 @@ radix_insert_compressed (radix_compressed_t * tree,
 
        g_assert (keybits >= masklen);
        msg_debug_radix ("want insert value %p with mask %z, key: %*xs",
-                       value, masklen, (int)keylen, key);
+                       (gpointer)value, masklen, (int)keylen, key);
 
        node = tree->root;
        next = node;
@@ -500,7 +502,7 @@ radix_insert_compressed (radix_compressed_t * tree,
                tree->size ++;
        }
        else if (next->value == RADIX_NO_VALUE) {
-               msg_debug_radix ("insert value node with %p", value);
+               msg_debug_radix ("insert value node with %p", (gpointer)value);
                next->value = value;
                tree->size ++;
        }
@@ -539,8 +541,9 @@ radix_insert_compressed (radix_compressed_t * tree,
                                                target_level, value, TRUE);
                                *prev = next;
                                msg_debug_radix ("move leaf node with value: %p, to level %ud, "
-                                               "set leaf node value to %p and level %ud", next->value,
-                                               cur_level, value, target_level);
+                                               "set leaf node value to %p and level %ud", (gpointer)next->value,
+                                               cur_level,
+                                               (gpointer)value, target_level);
                                next->skipped = FALSE;
                                if (*k & bit) {
                                        next->d.n.right = node;
index c5e6c3b24c8191af7d1ee43460d1380737095c19..62a133e48def0d3fa67d5110d4ce518122059feb 100644 (file)
@@ -743,7 +743,7 @@ rspamd_rrd_update_pdp_prep (struct rspamd_rrd_file *file,
                        rspamd_strlcpy (file->pdp_prep[i].last_ds, "U",
                                        sizeof (file->pdp_prep[i].last_ds));
                        pdp_new[i] = NAN;
-                       msg_debug_rrd ("adding unknown point interval %.3f is less than heartbeat %.3f",
+                       msg_debug_rrd ("adding unknown point interval %.3f is less than heartbeat %l",
                                        interval, file->ds_def[i].par[RRD_DS_mrhb_cnt].lv);
                }
                else {
@@ -1167,7 +1167,7 @@ rspamd_rrd_add_record (struct rspamd_rrd_file *file,
                                rra_steps[i] = 0;
                        }
 
-                       msg_debug_rrd ("cdp: %d, rra steps: %d(%d), pdp steps: %d",
+                       msg_debug_rrd ("cdp: %ud, rra steps: %ul(%ul), pdp steps: %ul",
                                        i, rra_steps[i], pdp_offset, pdp_steps);
 
                        /* Update this specific CDP */
@@ -1238,7 +1238,7 @@ rspamd_rrd_file_default (const gchar *path,
 
                if (file->stat_head->ds_cnt != 4 || file->stat_head->rra_cnt != 4) {
                        msg_err_rrd ("rrd file is not suitable for rspamd: it has "
-                                       "%d ds and %d rra", file->stat_head->ds_cnt,
+                                       "%ul ds and %ul rra", file->stat_head->ds_cnt,
                                        file->stat_head->rra_cnt);
                        g_set_error (err, rrd_error_quark (), EINVAL, "bad rrd file");
                        rspamd_rrd_close (file);
index 0580f945e819c711ace604f1a3d1071043115806..816d794dcf8ba3e3adabf3f3e4a7b54c3e6ae21e 100644 (file)
@@ -591,7 +591,7 @@ rspamd_socketpair (gint pair[2])
 
        if (r == -1) {
                msg_warn ("socketpair failed: %d, '%s'", errno, strerror (
-                               errno), pair[0], pair[1]);
+                               errno));
                return -1;
        }
 
index 519c49dede7e791711cc4a4c1e59def30143cc12..2e9f5f29c01177322a9b24666dd1e0127d890594 100644 (file)
@@ -516,8 +516,8 @@ rspamd_lua_dumpstack (lua_State *L)
                        break;
 
                case LUA_TBOOLEAN: /* booleans */
-                       r += rspamd_snprintf (buf + r, sizeof (buf) - r,lua_toboolean (L,
-                                       i) ? "bool: true" : "bool: false");
+                       r += rspamd_snprintf (buf + r, sizeof (buf) - r,
+                                       lua_toboolean (L, i) ? "bool: true" : "bool: false");
                        break;
 
                case LUA_TNUMBER: /* numbers */
index 0d489fd1cd59edc10bbc9aef40be076ce1aedaca..64587aae694b0fc32aa13220a55c0776a5162736 100644 (file)
@@ -416,7 +416,7 @@ xmlrpc_error (GMarkupParseContext *context, GError *error, gpointer user_data)
 {
        struct lua_xmlrpc_ud *ud = user_data;
 
-       msg_err ("xmlrpc parser error: %s", error->message, ud->parser_state);
+       msg_err ("xmlrpc parser error: %s", error->message);
 }
 
 static gint
index 42549c978a99f1f5f5d4b4149d0562e574e66f37..915fee49a013e0ac330461f3eee84f95fb9ee2be 100644 (file)
@@ -1259,7 +1259,7 @@ fuzzy_generate_commands (struct rspamd_task *task, struct fuzzy_rule *rule,
 
                if (part->words == NULL || part->words->len == 0) {
                        msg_info_task ("<%s>, part hash empty, skip fuzzy check",
-                               task->message_id, fuzzy_module_ctx->min_hash_len);
+                               task->message_id);
                        continue;
                }
 
index e090cd424485f20c4bc8ff5ab1526e3da8079311..e757c44a0b9cf8b9f87d2fd7142c700caccb036c 100644 (file)
@@ -180,7 +180,7 @@ rspamadm_pw_check (void)
        g_assert (pbkdf != NULL);
 
        if (encrypted_pwd->len < pbkdf->salt_len + pbkdf->key_len + 3) {
-               msg_err ("incorrect salt: password length: %d, must be at least %z characters",
+               msg_err ("incorrect salt: password length: %z, must be at least %z characters",
                                encrypted_pwd->len, pbkdf->salt_len);
                exit (EXIT_FAILURE);
        }