Browse Source

[Minor] Fix some compiler warnings

tags/2.7
Duncan Bellamy 3 years ago
parent
commit
d7738db697
6 changed files with 8 additions and 6 deletions
  1. 2
    0
      CMakeLists.txt
  2. 1
    1
      contrib/mumhash/mum.h
  3. 2
    2
      src/fuzzy_storage.c
  4. 1
    1
      src/libcryptobox/cryptobox.c
  5. 1
    1
      src/libserver/re_cache.c
  6. 1
    1
      src/rspamd.c

+ 2
- 0
CMakeLists.txt View File



PROJECT(rspamd VERSION "${RSPAMD_VERSION}" LANGUAGES C CXX ASM) PROJECT(rspamd VERSION "${RSPAMD_VERSION}" LANGUAGES C CXX ASM)


CMAKE_POLICY(SET CMP0075 NEW)

# This is supported merely with cmake 3.1 # This is supported merely with cmake 3.1
SET(CMAKE_C_STANDARD 11) SET(CMAKE_C_STANDARD 11)
SET(CMAKE_C_STANDARD_REQUIRED ON) SET(CMAKE_C_STANDARD_REQUIRED ON)

+ 1
- 1
contrib/mumhash/mum.h View File

multiplication. If we use a generic code we actually call a multiplication. If we use a generic code we actually call a
function doing 128x128->128 bit multiplication. The function is function doing 128x128->128 bit multiplication. The function is
very slow. */ very slow. */
lo = v * p, hi;
lo = v * p;
__asm__ ("umulh %0, %1, %2" : "=r" (hi) : "r" (v), "r" (p)); __asm__ ("umulh %0, %1, %2" : "=r" (hi) : "r" (v), "r" (p));
#else #else
__uint128_t r = (__uint128_t) v * (__uint128_t) p; __uint128_t r = (__uint128_t) v * (__uint128_t) p;

+ 2
- 2
src/fuzzy_storage.c View File

rspamd_fuzzy_check_callback (struct rspamd_fuzzy_reply *result, void *ud) rspamd_fuzzy_check_callback (struct rspamd_fuzzy_reply *result, void *ud)
{ {
struct fuzzy_session *session = 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; struct rspamd_fuzzy_cmd *cmd = NULL;
const struct rspamd_shingle *shingle = NULL; const struct rspamd_shingle *shingle = NULL;
struct rspamd_shingle sgl_cpy; struct rspamd_shingle sgl_cpy;
static void static void
rspamd_fuzzy_process_command (struct fuzzy_session *session) 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_cmd *cmd = NULL;
struct rspamd_fuzzy_reply result; struct rspamd_fuzzy_reply result;
struct fuzzy_peer_cmd up_cmd; struct fuzzy_peer_cmd up_cmd;

+ 1
- 1
src/libcryptobox/cryptobox.c View File

static void static void
rspamd_cryptobox_cpuid (gint cpu[4], gint info) 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; eax = info;
#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) #if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))

+ 1
- 1
src/libserver/re_cache.c View File

{ {
lua_State *L = (lua_State *)task->cfg->lua_state; lua_State *L = (lua_State *)task->cfg->lua_state;
GError *err = NULL; GError *err = NULL;
struct rspamd_lua_text *t;
struct rspamd_lua_text __attribute__ ((unused)) *t;
gint text_pos; gint text_pos;


if (G_LIKELY (lua_cbref == -1)) { if (G_LIKELY (lua_cbref == -1)) {

+ 1
- 1
src/rspamd.c View File

mark_old_workers (gpointer key, gpointer value, gpointer unused) mark_old_workers (gpointer key, gpointer value, gpointer unused)
{ {
struct rspamd_worker *w = value; struct rspamd_worker *w = value;
struct rspamd_main *rspamd_main;
struct rspamd_main __attribute__ ((unused)) *rspamd_main;


rspamd_main = w->srv; rspamd_main = w->srv;



Loading…
Cancel
Save