From: Vsevolod Stakhov Date: Thu, 5 Feb 2026 12:44:03 +0000 (+0000) Subject: [Fix] Use %ud instead of %u in rspamd printf format strings X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac43cb5212bff7b2c3bde84c3f6c139ac69893af;p=thirdparty%2Frspamd.git [Fix] Use %ud instead of %u in rspamd printf format strings --- diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c index 39606eb018..5fa410969b 100644 --- a/src/libserver/re_cache.c +++ b/src/libserver/re_cache.c @@ -3578,7 +3578,7 @@ rspamd_re_cache_apply_hyperscan_blob(struct rspamd_re_cache *cache, /* Verify the regexp at this ID belongs to the current re_class */ if (rspamd_regexp_get_class(elt->re) != re_class) { - msg_info_re_cache("stale hyperscan cache for class %s: id %u points to " + msg_info_re_cache("stale hyperscan cache for class %s: id %ud points to " "wrong re_class, will use PCRE until recompilation", re_class->hash, ids[i]); hs_free_scratch(re_class->hs_scratch); diff --git a/src/libstat/tokenizers/tokenizer_manager.c b/src/libstat/tokenizers/tokenizer_manager.c index e6fb5e8d8c..8e95136453 100644 --- a/src/libstat/tokenizers/tokenizer_manager.c +++ b/src/libstat/tokenizers/tokenizer_manager.c @@ -198,7 +198,7 @@ rspamd_tokenizer_manager_load_tokenizer(struct rspamd_tokenizer_manager *mgr, msg_info_tokenizer("successfully obtained API from custom tokenizer '%s'", name); /* Check API version */ - msg_info_tokenizer("checking API version for custom tokenizer '%s' (got %u, expected %u)", + msg_info_tokenizer("checking API version for custom tokenizer '%s' (got %ud, expected %ud)", name, api->api_version, RSPAMD_CUSTOM_TOKENIZER_API_VERSION); if (api->api_version != RSPAMD_CUSTOM_TOKENIZER_API_VERSION) { dlclose(handle); @@ -258,7 +258,7 @@ rspamd_tokenizer_manager_load_tokenizer(struct rspamd_tokenizer_manager *mgr, /* Re-sort by priority */ g_array_sort(mgr->detection_order, rspamd_custom_tokenizer_priority_cmp); - msg_info_tokenizer("custom tokenizer '%s' registered and sorted by priority (total tokenizers: %u)", + msg_info_tokenizer("custom tokenizer '%s' registered and sorted by priority (total tokenizers: %ud)", name, mgr->detection_order->len); msg_info_tokenizer("successfully loaded custom tokenizer '%s' (priority %.1f) from %s", @@ -329,7 +329,7 @@ rspamd_tokenizer_manager_detect(struct rspamd_tokenizer_manager *mgr, } /* Try each tokenizer in priority order */ - msg_info_tokenizer("trying %u tokenizers for general detection", mgr->detection_order->len); + msg_info_tokenizer("trying %ud tokenizers for general detection", mgr->detection_order->len); for (i = 0; i < mgr->detection_order->len; i++) { tok = g_array_index(mgr->detection_order, struct rspamd_custom_tokenizer *, i); diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 9d7d9669b5..7f0ba2367c 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -974,7 +974,7 @@ fuzzy_tcp_connection_cleanup(struct fuzzy_tcp_connection *conn, const char *reas } if (removed > 0 && task) { - msg_warn_task("fuzzy_tcp: cleaned up %u pending commands due to connection failure: %s", + msg_warn_task("fuzzy_tcp: cleaned up %ud pending commands due to connection failure: %s", removed, reason ? reason : "unknown"); } @@ -2958,7 +2958,7 @@ fuzzy_tcp_session_cleanup(struct fuzzy_client_session *session) } if (removed > 0 && session->task) { - msg_debug_fuzzy_check("fuzzy_tcp: cleaned up %u pending commands for finished session", + msg_debug_fuzzy_check("fuzzy_tcp: cleaned up %ud pending commands for finished session", removed); } }