Browse Source

[Minor] Fix some compiler warnings

tags/3.5
Duncan Bellamy 1 year ago
parent
commit
aeac58faaf

+ 2
- 0
contrib/libottery/aes_cryptobox.c View File

#include "cryptobox.h" #include "cryptobox.h"


#if defined(__x86_64__) && defined(RSPAMD_HAS_TARGET_ATTR) #if defined(__x86_64__) && defined(RSPAMD_HAS_TARGET_ATTR)
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC push_options #pragma GCC push_options
#pragma GCC target("aes") #pragma GCC target("aes")
#endif
#ifndef __SSE2__ #ifndef __SSE2__
#define __SSE2__ #define __SSE2__
#endif #endif

+ 4
- 0
src/libcryptobox/base64/avx2.c View File

extern const uint8_t base64_table_dec[256]; extern const uint8_t base64_table_dec[256];


#ifdef RSPAMD_HAS_TARGET_ATTR #ifdef RSPAMD_HAS_TARGET_ATTR
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC push_options #pragma GCC push_options
#pragma GCC target("avx2") #pragma GCC target("avx2")
#endif
#ifndef __SSE2__ #ifndef __SSE2__
#define __SSE2__ #define __SSE2__
#endif #endif
return ret; return ret;
} }


#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC pop_options #pragma GCC pop_options
#endif #endif
#endif

+ 4
- 0
src/libcryptobox/base64/sse42.c View File

extern const uint8_t base64_table_dec[256]; extern const uint8_t base64_table_dec[256];


#ifdef RSPAMD_HAS_TARGET_ATTR #ifdef RSPAMD_HAS_TARGET_ATTR
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC push_options #pragma GCC push_options
#pragma GCC target("sse4.2") #pragma GCC target("sse4.2")
#endif
#ifndef __SSE2__ #ifndef __SSE2__
#define __SSE2__ #define __SSE2__
#endif #endif
return ret; return ret;
} }


#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC pop_options #pragma GCC pop_options
#endif #endif
#endif

+ 1
- 1
test/rspamd_dkim_test.c View File

} }
#endif #endif
void void
rspamd_dkim_test_func ()
rspamd_dkim_test_func (void)
{ {
#if 0 #if 0
rspamd_dkim_context_t *ctx; rspamd_dkim_context_t *ctx;

+ 1
- 1
test/rspamd_dns_test.c View File

} }


void void
rspamd_dns_test_func ()
rspamd_dns_test_func (void)
{ {


struct rspamd_config *cfg; struct rspamd_config *cfg;

+ 1
- 1
test/rspamd_lua_test.c View File

return 1; return 1;
} }


void
_Noreturn void
rspamd_lua_test_func (void) rspamd_lua_test_func (void)
{ {
lua_State *L = (lua_State *)rspamd_main->cfg->lua_state; lua_State *L = (lua_State *)rspamd_main->cfg->lua_state;

+ 1
- 1
test/rspamd_mem_pool_test.c View File

#define TEST2_BUF "test buffertest buffer" #define TEST2_BUF "test buffertest buffer"


void void
rspamd_mem_pool_test_func ()
rspamd_mem_pool_test_func (void)
{ {
rspamd_mempool_t *pool; rspamd_mempool_t *pool;
rspamd_mempool_stat_t st; rspamd_mempool_stat_t st;

+ 1
- 1
test/rspamd_rrd_test.c View File

const int pdp_per_cdp = 60; const int pdp_per_cdp = 60;


void void
rspamd_rrd_test_func ()
rspamd_rrd_test_func (void)
{ {
gchar tmpfile[PATH_MAX]; gchar tmpfile[PATH_MAX];
struct rrd_rra_def rra[4]; struct rrd_rra_def rra[4];

+ 1
- 1
test/rspamd_statfile_test.c View File

#define HASHES_NUM 256 #define HASHES_NUM 256


void void
rspamd_statfile_test_func ()
rspamd_statfile_test_func (void)
{ {
/* /*
* XXX: broken, old, need to be rewritten * XXX: broken, old, need to be rewritten

+ 1
- 1
test/rspamd_url_test.c View File



/* Function for using in glib test suite */ /* Function for using in glib test suite */
void void
rspamd_url_test_func ()
rspamd_url_test_func (void)
{ {
/* XXX: maybe write test for this */ /* XXX: maybe write test for this */
} }

Loading…
Cancel
Save