@@ -23,6 +23,8 @@ SET(RSPAMD_VERSION "${RSPAMD_VERSION_MAJOR}.${RSPAMD_VERSION_MINOR}") | |||
PROJECT(rspamd VERSION "${RSPAMD_VERSION}" LANGUAGES C CXX ASM) | |||
CMAKE_POLICY(SET CMP0075 NEW) | |||
# This is supported merely with cmake 3.1 | |||
SET(CMAKE_C_STANDARD 11) | |||
SET(CMAKE_C_STANDARD_REQUIRED ON) |
@@ -115,7 +115,7 @@ _mum (uint64_t v, uint64_t p) { | |||
multiplication. If we use a generic code we actually call a | |||
function doing 128x128->128 bit multiplication. The function is | |||
very slow. */ | |||
lo = v * p, hi; | |||
lo = v * p; | |||
__asm__ ("umulh %0, %1, %2" : "=r" (hi) : "r" (v), "r" (p)); | |||
#else | |||
__uint128_t r = (__uint128_t) v * (__uint128_t) p; |
@@ -807,7 +807,7 @@ static void | |||
rspamd_fuzzy_check_callback (struct rspamd_fuzzy_reply *result, void *ud) | |||
{ | |||
struct fuzzy_session *session = ud; | |||
gboolean encrypted = FALSE, is_shingle = FALSE; | |||
gboolean is_shingle = FALSE, __attribute__ ((unused)) encrypted = FALSE; | |||
struct rspamd_fuzzy_cmd *cmd = NULL; | |||
const struct rspamd_shingle *shingle = NULL; | |||
struct rspamd_shingle sgl_cpy; | |||
@@ -970,7 +970,7 @@ rspamd_fuzzy_check_callback (struct rspamd_fuzzy_reply *result, void *ud) | |||
static void | |||
rspamd_fuzzy_process_command (struct fuzzy_session *session) | |||
{ | |||
gboolean encrypted = FALSE, is_shingle = FALSE; | |||
gboolean is_shingle = FALSE, __attribute__ ((unused)) encrypted = FALSE; | |||
struct rspamd_fuzzy_cmd *cmd = NULL; | |||
struct rspamd_fuzzy_reply result; | |||
struct fuzzy_peer_cmd up_cmd; |
@@ -70,7 +70,7 @@ static const guchar n0[16] = {0}; | |||
static void | |||
rspamd_cryptobox_cpuid (gint cpu[4], gint info) | |||
{ | |||
guint32 eax, ecx = 0, ebx = 0, edx = 0; | |||
guint32 __attribute__ ((unused)) eax, __attribute__ ((unused)) ecx = 0, __attribute__ ((unused)) ebx = 0, __attribute__ ((unused)) edx = 0; | |||
eax = info; | |||
#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) |
@@ -553,7 +553,7 @@ rspamd_re_cache_check_lua_condition (struct rspamd_task *task, | |||
{ | |||
lua_State *L = (lua_State *)task->cfg->lua_state; | |||
GError *err = NULL; | |||
struct rspamd_lua_text *t; | |||
struct rspamd_lua_text __attribute__ ((unused)) *t; | |||
gint text_pos; | |||
if (G_LIKELY (lua_cbref == -1)) { |
@@ -781,7 +781,7 @@ static void | |||
mark_old_workers (gpointer key, gpointer value, gpointer unused) | |||
{ | |||
struct rspamd_worker *w = value; | |||
struct rspamd_main *rspamd_main; | |||
struct rspamd_main __attribute__ ((unused)) *rspamd_main; | |||
rspamd_main = w->srv; | |||