]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix warnings
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 18 Nov 2019 16:25:46 +0000 (16:25 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 18 Nov 2019 16:29:14 +0000 (16:29 +0000)
src/libmime/message.c
src/libmime/mime_encoding.c
src/libserver/spf.c

index f3aba6001c4239bc1f0303205775f93cf2013ee7..9009408cbbda7c8ec69fe22c19a98a80f1f3847a 100644 (file)
@@ -488,6 +488,12 @@ rspamd_strip_newlines_parse (struct rspamd_task *task,
        }
 }
 
+static void
+rspamd_u_text_dtor (void *p)
+{
+       utext_close ((UText *)p);
+}
+
 static void
 rspamd_normalize_text_part (struct rspamd_task *task,
                struct rspamd_mime_text_part *part)
@@ -535,7 +541,7 @@ rspamd_normalize_text_part (struct rspamd_task *task,
                }
                else {
                        rspamd_mempool_add_destructor (task->task_pool,
-                                       (rspamd_mempool_destruct_t)utext_close,
+                                       rspamd_u_text_dtor,
                                        &part->utf_stripped_text);
                }
        }
index 17da31f30f1848affb558ea913630897157b6da6..dcaa1612a74f784425732f49549421499507fa46 100644 (file)
@@ -479,10 +479,10 @@ rspamd_mime_charset_utf_enforce (gchar *in, gsize len)
 
        while (p < end && len > 0 && (err_offset = rspamd_fast_utf8_validate (p, len)) > 0) {
                err_offset --; /* As it returns it 1 indexed */
-               goffset cur_offset = err_offset;
+               gint32 cur_offset = err_offset;
 
                while (cur_offset < len) {
-                       goffset tmp = cur_offset;
+                       gint32 tmp = cur_offset;
 
                        U8_NEXT (p, cur_offset, len, uc);
 
index 46a6dd0a3aa235d941437bb54551f0e5d909a29a..3106a4ffd33ea3f8518d279d0b4f86539a566fba 100644 (file)
@@ -157,7 +157,7 @@ void
 spf_library_config (const ucl_object_t *obj)
 {
        const ucl_object_t *value;
-       guint64 ival;
+       gint64 ival;
        bool bval;
 
        if (obj == NULL) {