]> source.dussan.org Git - rspamd.git/commitdiff
Fix some minor warnings.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 3 Sep 2015 17:28:28 +0000 (18:28 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 3 Sep 2015 17:28:28 +0000 (18:28 +0100)
src/libserver/cfg_rcl.h
src/libserver/symbols_cache.c
src/libutil/map.c
src/worker.c

index b18867cd1f3167021243ad4a6d890c8ee13d3496..92b266920c032f9c9311cdd3e8e8f9917f1406f6 100644 (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;
 };
 
 /**
index 5cfa4cff3656062ad4adb7b85cd0203be18278ce..b7e45a4e68329fb2c7c6fb8faa976bbbcb2f5130 100644 (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;
        }
 
index e632fc8719d9ed01b2df0f8baddbe95801f09101..2ef68302e7e8bdd4166eb4a1f2ff4f8bafedf4af 100644 (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;
index fa128d8b7f88ea37d8ce04bf1a69949bb464f8fd..2d37c8b5f0098d7637d90a23847f64159dc99dc9 100644 (file)
@@ -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
+}