Browse Source

Fix some minor warnings.

tags/1.0.0
Vsevolod Stakhov 8 years ago
parent
commit
03729690b7
4 changed files with 22 additions and 19 deletions
  1. 17
    15
      src/libserver/cfg_rcl.h
  2. 3
    2
      src/libserver/symbols_cache.c
  3. 1
    1
      src/libutil/map.c
  4. 1
    1
      src/worker.c

+ 17
- 15
src/libserver/cfg_rcl.h View File

@@ -39,24 +39,26 @@ struct rspamd_rcl_section;
struct rspamd_config;
struct rspamd_rcl_default_handler_data;

enum rspamd_rcl_flag {
RSPAMD_CL_FLAG_TIME_FLOAT = 0x1 << 0,
RSPAMD_CL_FLAG_TIME_TIMEVAL = 0x1 << 1,
RSPAMD_CL_FLAG_TIME_TIMESPEC = 0x1 << 2,
RSPAMD_CL_FLAG_TIME_INTEGER = 0x1 << 3,
RSPAMD_CL_FLAG_TIME_UINT_32 = 0x1 << 4,
RSPAMD_CL_FLAG_INT_16 = 0x1 << 5,
RSPAMD_CL_FLAG_INT_32 = 0x1 << 6,
RSPAMD_CL_FLAG_INT_64 = 0x1 << 7,
RSPAMD_CL_FLAG_UINT = 0x1 << 8,
RSPAMD_CL_FLAG_INT_SIZE = 0x1 << 9,
RSPAMD_CL_FLAG_STRING_PATH = 0x1 << 10,
RSPAMD_CL_FLAG_BOOLEAN_INVERSE = 0x1 << 11,
RSPAMD_CL_FLAG_STRING_LIST_HASH = 0x1 << 12
};

struct rspamd_rcl_struct_parser {
gpointer user_struct;
goffset offset;
enum {
RSPAMD_CL_FLAG_TIME_FLOAT = 0x1 << 0,
RSPAMD_CL_FLAG_TIME_TIMEVAL = 0x1 << 1,
RSPAMD_CL_FLAG_TIME_TIMESPEC = 0x1 << 2,
RSPAMD_CL_FLAG_TIME_INTEGER = 0x1 << 3,
RSPAMD_CL_FLAG_TIME_UINT_32 = 0x1 << 4,
RSPAMD_CL_FLAG_INT_16 = 0x1 << 5,
RSPAMD_CL_FLAG_INT_32 = 0x1 << 6,
RSPAMD_CL_FLAG_INT_64 = 0x1 << 7,
RSPAMD_CL_FLAG_UINT = 0x1 << 8,
RSPAMD_CL_FLAG_INT_SIZE = 0x1 << 9,
RSPAMD_CL_FLAG_STRING_PATH = 0x1 << 10,
RSPAMD_CL_FLAG_BOOLEAN_INVERSE = 0x1 << 11,
RSPAMD_CL_FLAG_STRING_LIST_HASH = 0x1 << 12
} flags;
enum rspamd_rcl_flag flags;
};

/**

+ 3
- 2
src/libserver/symbols_cache.c View File

@@ -542,13 +542,14 @@ rspamd_symbols_cache_add_symbol (struct symbols_cache *cache,
}

gboolean
rspamd_symbols_cache_add_condition (struct symbols_cache *cache, gint id, lua_State *L, gint cbref)
rspamd_symbols_cache_add_condition (struct symbols_cache *cache, gint id,
lua_State *L, gint cbref)
{
struct cache_item *item;

g_assert (cache != NULL);

if (id < 0 || id >= cache->items_by_id->len) {
if (id < 0 || id >= (gint)cache->items_by_id->len) {
return FALSE;
}


+ 1
- 1
src/libutil/map.c View File

@@ -287,7 +287,7 @@ read_map_file (struct rspamd_map *map, struct file_map_data *data)
}

if (remain != NULL && remain > buf) {
g_assert (rlen <= sizeof (buf) - 2);
g_assert (rlen <= (gint)sizeof (buf) - 2);
buf[rlen++] = '\n';
buf[rlen] = '\0';
tlen += rlen;

+ 1
- 1
src/worker.c View File

@@ -343,4 +343,4 @@ start_worker (struct rspamd_worker *worker)
rspamd_keypair_cache_destroy (ctx->keys_cache);

exit (EXIT_SUCCESS);
}
}

Loading…
Cancel
Save