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

@@ -28,8 +28,10 @@
#include "cryptobox.h"

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

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

@@ -49,8 +49,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern const uint8_t base64_table_dec[256];

#ifdef RSPAMD_HAS_TARGET_ATTR
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC push_options
#pragma GCC target("avx2")
#endif
#ifndef __SSE2__
#define __SSE2__
#endif
@@ -281,5 +283,7 @@ repeat:
return ret;
}

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

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

@@ -49,8 +49,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern const uint8_t base64_table_dec[256];

#ifdef RSPAMD_HAS_TARGET_ATTR
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC push_options
#pragma GCC target("sse4.2")
#endif
#ifndef __SSE2__
#define __SSE2__
#endif
@@ -263,5 +265,7 @@ repeat:
return ret;
}

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

+ 1
- 1
test/rspamd_dkim_test.c View File

@@ -50,7 +50,7 @@ session_fin (gpointer unused)
}
#endif
void
rspamd_dkim_test_func ()
rspamd_dkim_test_func (void)
{
#if 0
rspamd_dkim_context_t *ctx;

+ 1
- 1
test/rspamd_dns_test.c View File

@@ -61,7 +61,7 @@ test_dns_cb (struct rdns_reply *reply, gpointer arg)
}

void
rspamd_dns_test_func ()
rspamd_dns_test_func (void)
{

struct rspamd_config *cfg;

+ 1
- 1
test/rspamd_lua_test.c View File

@@ -56,7 +56,7 @@ traceback (lua_State *L)
return 1;
}

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

+ 1
- 1
test/rspamd_mem_pool_test.c View File

@@ -12,7 +12,7 @@
#define TEST2_BUF "test buffertest buffer"

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

+ 1
- 1
test/rspamd_rrd_test.c View File

@@ -24,7 +24,7 @@ const int rows_cnt = 20;
const int pdp_per_cdp = 60;

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

+ 1
- 1
test/rspamd_statfile_test.c View File

@@ -7,7 +7,7 @@
#define HASHES_NUM 256

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

+ 1
- 1
test/rspamd_url_test.c View File

@@ -55,7 +55,7 @@ const char *test_html = "<some_tag>This is test file with <a href=\"http://micro

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

Loading…
Cancel
Save