aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcryptobox/cryptobox.c4
-rw-r--r--src/libutil/mem_pool.c2
-rw-r--r--src/libutil/str_util.c6
-rw-r--r--src/libutil/str_util.h2
-rw-r--r--src/rspamadm/lua_repl.c2
5 files changed, 9 insertions, 7 deletions
diff --git a/src/libcryptobox/cryptobox.c b/src/libcryptobox/cryptobox.c
index d8f5459d3..1dcd18838 100644
--- a/src/libcryptobox/cryptobox.c
+++ b/src/libcryptobox/cryptobox.c
@@ -245,6 +245,8 @@ rspamd_cryptobox_test_instr (gint instr)
signal (SIGILL, old_handler);
#endif
+ (void)rd; /* Silence warning */
+
/* We actually never return here if SIGILL has been caught */
return ok == 1;
}
@@ -354,6 +356,8 @@ rspamd_cryptobox_init (void)
case CPUID_RDRAND:
rspamd_printf_gstring (buf, "rdrand, ");
break;
+ default:
+ break; /* Silence warning */
}
}
}
diff --git a/src/libutil/mem_pool.c b/src/libutil/mem_pool.c
index a519013d1..7ef649c0c 100644
--- a/src/libutil/mem_pool.c
+++ b/src/libutil/mem_pool.c
@@ -75,7 +75,7 @@ struct rspamd_mempool_entry_point {
static inline uint32_t
rspamd_entry_hash (const char *str)
{
- return rspamd_cryptobox_fast_hash (str, strlen (str), rspamd_hash_seed ());
+ return (guint)rspamd_cryptobox_fast_hash (str, strlen (str), rspamd_hash_seed ());
}
static inline int
diff --git a/src/libutil/str_util.c b/src/libutil/str_util.c
index ac7471ada..d32a0d4d1 100644
--- a/src/libutil/str_util.c
+++ b/src/libutil/str_util.c
@@ -265,7 +265,7 @@ rspamd_str_hash (gconstpointer key)
len = strlen ((const gchar *)key);
- return rspamd_cryptobox_fast_hash (key, len, rspamd_hash_seed ());
+ return (guint)rspamd_cryptobox_fast_hash (key, len, rspamd_hash_seed ());
}
gboolean
@@ -314,7 +314,7 @@ rspamd_ftok_hash (gconstpointer key)
{
const rspamd_ftok_t *f = key;
- return t1ha (f->begin, f->len, rspamd_hash_seed ());
+ return (guint)rspamd_cryptobox_fast_hash (f->begin, f->len, rspamd_hash_seed ());
}
gboolean
@@ -2768,7 +2768,7 @@ rspamd_str_regexp_escape (const gchar *pattern, gsize slen,
gchar *
-rspamd_str_make_utf_valid (const gchar *src, gsize slen, gsize *dstlen)
+rspamd_str_make_utf_valid (const guchar *src, gsize slen, gsize *dstlen)
{
GString *dst;
const gchar *last;
diff --git a/src/libutil/str_util.h b/src/libutil/str_util.h
index 91efdf187..8e8898a32 100644
--- a/src/libutil/str_util.h
+++ b/src/libutil/str_util.h
@@ -476,7 +476,7 @@ rspamd_str_regexp_escape (const gchar *pattern, gsize slen,
* @param dstelen
* @return
*/
-gchar * rspamd_str_make_utf_valid (const gchar *src, gsize slen, gsize *dstlen);
+gchar * rspamd_str_make_utf_valid (const guchar *src, gsize slen, gsize *dstlen);
/**
* Strips characters in `strip_chars` from start and end of the GString
diff --git a/src/rspamadm/lua_repl.c b/src/rspamadm/lua_repl.c
index e91bd34fa..430c800f9 100644
--- a/src/rspamadm/lua_repl.c
+++ b/src/rspamadm/lua_repl.c
@@ -619,8 +619,6 @@ static void
rspamadm_lua_error_handler (struct rspamd_http_connection_entry *conn_ent,
GError *err)
{
- struct rspamadm_lua_repl_session *session = conn_ent->ud;
-
rspamd_fprintf (stderr, "http error occurred: %s\n", err->message);
}