aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-09-03 18:28:28 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-09-03 18:28:28 +0100
commit03729690b7137c1bdbe8b1d3b770ef8493300126 (patch)
treea8b28ef350b245ba92ceabf1542c903a660e6c08 /src
parentb361af86b99c7e4b6e6f3fcd508b882ffb0c9d9e (diff)
downloadrspamd-03729690b7137c1bdbe8b1d3b770ef8493300126.tar.gz
rspamd-03729690b7137c1bdbe8b1d3b770ef8493300126.zip
Fix some minor warnings.
Diffstat (limited to 'src')
-rw-r--r--src/libserver/cfg_rcl.h32
-rw-r--r--src/libserver/symbols_cache.c5
-rw-r--r--src/libutil/map.c2
-rw-r--r--src/worker.c2
4 files changed, 22 insertions, 19 deletions
diff --git a/src/libserver/cfg_rcl.h b/src/libserver/cfg_rcl.h
index b18867cd1..92b266920 100644
--- a/src/libserver/cfg_rcl.h
+++ b/src/libserver/cfg_rcl.h
@@ -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;
};
/**
diff --git a/src/libserver/symbols_cache.c b/src/libserver/symbols_cache.c
index 5cfa4cff3..b7e45a4e6 100644
--- a/src/libserver/symbols_cache.c
+++ b/src/libserver/symbols_cache.c
@@ -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;
}
diff --git a/src/libutil/map.c b/src/libutil/map.c
index e632fc871..2ef68302e 100644
--- a/src/libutil/map.c
+++ b/src/libutil/map.c
@@ -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;
diff --git a/src/worker.c b/src/worker.c
index fa128d8b7..2d37c8b5f 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -343,4 +343,4 @@ start_worker (struct rspamd_worker *worker)
rspamd_keypair_cache_destroy (ctx->keys_cache);
exit (EXIT_SUCCESS);
-} \ No newline at end of file
+}