aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libstat/backends/redis_backend.c9
-rw-r--r--src/libstat/backends/sqlite3_backend.c3
2 files changed, 7 insertions, 5 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c
index 5d6ba7d98..d940812ce 100644
--- a/src/libstat/backends/redis_backend.c
+++ b/src/libstat/backends/redis_backend.c
@@ -158,7 +158,8 @@ rspamd_redis_expand_object (const gchar *pattern,
}
if (rcpt) {
- rspamd_mempool_set_variable (task->task_pool, "stat_user", rcpt, NULL);
+ rspamd_mempool_set_variable (task->task_pool, "stat_user",
+ (gpointer)rcpt, NULL);
}
}
@@ -739,7 +740,7 @@ rspamd_redis_connected (redisAsyncContext *c, gpointer r, gpointer priv)
rt->conn_state = RSPAMD_REDIS_CONNECTED;
- msg_debug_task ("connected to redis server, tokens learned for %s: %d",
+ msg_debug_task ("connected to redis server, tokens learned for %s: %uL",
rt->redis_object_expanded, rt->learned);
rspamd_upstream_ok (rt->selected);
rspamd_session_remove_event (task->s, rspamd_redis_fin, rt);
@@ -1196,7 +1197,7 @@ rspamd_redis_learn_tokens (struct rspamd_task *task, GPtrArray *tokens,
"learns\r\n"
"$1\r\n"
"1\r\n",
- strlen (rt->redis_object_expanded),
+ (gint)strlen (rt->redis_object_expanded),
rt->redis_object_expanded);
}
else {
@@ -1210,7 +1211,7 @@ rspamd_redis_learn_tokens (struct rspamd_task *task, GPtrArray *tokens,
"learns\r\n"
"$2\r\n"
"-1\r\n",
- strlen (rt->redis_object_expanded),
+ (gint)strlen (rt->redis_object_expanded),
rt->redis_object_expanded);
}
diff --git a/src/libstat/backends/sqlite3_backend.c b/src/libstat/backends/sqlite3_backend.c
index ee9e53214..0983236bc 100644
--- a/src/libstat/backends/sqlite3_backend.c
+++ b/src/libstat/backends/sqlite3_backend.c
@@ -335,7 +335,8 @@ rspamd_sqlite3_get_user (struct rspamd_stat_sqlite3_db *db,
if (user != NULL) {
- rspamd_mempool_set_variable (task->task_pool, "stat_user", user, NULL);
+ rspamd_mempool_set_variable (task->task_pool, "stat_user",
+ (gpointer)user, NULL);
rc = rspamd_sqlite3_run_prstmt (task->task_pool, db->sqlite, db->prstmt,
RSPAMD_STAT_BACKEND_GET_USER, user, &id);