diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-18 16:25:46 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-18 16:29:14 +0000 |
commit | ed9ea722a7539231489f6de17498fc72768d13f1 (patch) | |
tree | 6866c796502bf9a9d54d8bb75bf3b28fa1fe1211 /src/libmime | |
parent | 2659eac9a2afabb4c4d864db98d8bdf54a6ca50c (diff) | |
download | rspamd-ed9ea722a7539231489f6de17498fc72768d13f1.tar.gz rspamd-ed9ea722a7539231489f6de17498fc72768d13f1.zip |
[Minor] Fix warnings
Diffstat (limited to 'src/libmime')
-rw-r--r-- | src/libmime/message.c | 8 | ||||
-rw-r--r-- | src/libmime/mime_encoding.c | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c index f3aba6001..9009408cb 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -489,6 +489,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); } } diff --git a/src/libmime/mime_encoding.c b/src/libmime/mime_encoding.c index 17da31f30..dcaa1612a 100644 --- a/src/libmime/mime_encoding.c +++ b/src/libmime/mime_encoding.c @@ -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); |