aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-02 12:42:49 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-02 12:42:49 +0000
commit8cef31af2aa08a23661ce230207ed768a693edef (patch)
tree6aa8420f4bd3db1fef6b43d5a37023ef7241e0e3
parentb00df4f1979888a6d3de48d4e586eb9e3aed21af (diff)
downloadrspamd-8cef31af2aa08a23661ce230207ed768a693edef.tar.gz
rspamd-8cef31af2aa08a23661ce230207ed768a693edef.zip
Fix some compile time warnings.
-rw-r--r--src/controller.c2
-rw-r--r--src/libmime/expressions.c3
-rw-r--r--src/libserver/dkim.c2
-rw-r--r--src/main.c2
-rw-r--r--src/plugins/surbl.c3
5 files changed, 5 insertions, 7 deletions
diff --git a/src/controller.c b/src/controller.c
index e54aae0f6..20a066b80 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -1259,7 +1259,7 @@ rspamd_controller_handle_stat_common (
struct rspamd_controller_session *session = conn_ent->ud;
ucl_object_t *top, *sub;
gint i;
- guint64 learned = 0, spam, ham;
+ guint64 learned = 0, spam = 0, ham = 0;
rspamd_mempool_stat_t mem_st;
struct rspamd_stat *stat, stat_copy;
diff --git a/src/libmime/expressions.c b/src/libmime/expressions.c
index 0ff34e24b..be64e45da 100644
--- a/src/libmime/expressions.c
+++ b/src/libmime/expressions.c
@@ -1236,7 +1236,6 @@ rspamd_recipients_distance (struct rspamd_task *task, GList * args,
{
struct expression_argument *arg;
InternetAddressList *cur;
- InternetAddress *addr;
double threshold;
struct addr_list *ar;
gchar *c;
@@ -1272,7 +1271,6 @@ rspamd_recipients_distance (struct rspamd_task *task, GList * args,
cur = task->rcpt_mime;
#ifdef GMIME24
for (i = 0; i < num; i++) {
- addr = internet_address_list_get_address (cur, i);
InternetAddress *iaelt =
internet_address_list_get_address(cur, i);
InternetAddressMailbox *iamb =
@@ -1286,6 +1284,7 @@ rspamd_recipients_distance (struct rspamd_task *task, GList * args,
}
}
#else
+ InternetAddress *addr;
i = 0;
while (cur) {
addr = internet_address_list_get_address (cur);
diff --git a/src/libserver/dkim.c b/src/libserver/dkim.c
index e178cfea4..b439661c2 100644
--- a/src/libserver/dkim.c
+++ b/src/libserver/dkim.c
@@ -1150,7 +1150,7 @@ rspamd_dkim_canonize_body (rspamd_dkim_context_t *ctx,
const gchar *end)
{
const gchar *p;
- guint remain = ctx->len ? ctx->len : end - start;
+ guint remain = ctx->len ? ctx->len : (guint)(end - start);
if (start == NULL) {
/* Empty body */
diff --git a/src/main.c b/src/main.c
index 5b4505bb0..35bec6f2b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1134,7 +1134,7 @@ rspamd_init_main (struct rspamd_main *rspamd)
}
static void
-rspamd_init_libs ()
+rspamd_init_libs (void)
{
struct rlimit rlim;
diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c
index 2fe35031a..b7a3a8337 100644
--- a/src/plugins/surbl.c
+++ b/src/plugins/surbl.c
@@ -310,7 +310,7 @@ surbl_module_config (struct rspamd_config *cfg)
ucl_object_iter_t it = NULL;
const gchar *redir_val;
guint32 bit;
- gint i, idx;
+ gint i;
if ((value =
@@ -324,7 +324,6 @@ surbl_module_config (struct rspamd_config *cfg)
rspamd_mempool_add_destructor (surbl_module_ctx->surbl_pool,
(rspamd_mempool_destruct_t)rspamd_upstreams_destroy,
surbl_module_ctx->redirectors);
- idx = 0;
LL_FOREACH (value, cur)
{
redir_val = ucl_obj_tostring (cur);