commit ed9ea72: [Minor] Fix warnings
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Nov 18 16:35:08 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-11-18 16:25:46 +0000
URL: https://github.com/rspamd/rspamd/commit/ed9ea722a7539231489f6de17498fc72768d13f1
[Minor] Fix warnings
---
src/libmime/message.c | 8 +++++++-
src/libmime/mime_encoding.c | 4 ++--
src/libserver/spf.c | 2 +-
3 files changed, 10 insertions(+), 4 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
@@ -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);
}
}
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);
diff --git a/src/libserver/spf.c b/src/libserver/spf.c
index 46a6dd0a3..3106a4ffd 100644
--- a/src/libserver/spf.c
+++ b/src/libserver/spf.c
@@ -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) {
More information about the Commits
mailing list