summaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-14 10:49:26 +0100
committerGitHub <noreply@github.com>2020-04-14 10:49:26 +0100
commit13724fefdc9dbc31609938c06d6c99ba47d1729d (patch)
treed3ac8a5c59504a0362d0a692069f9b20973e3edf /src/lua
parent29f38bde308faed44b6298338451fb7b82923c65 (diff)
parentb29b85055e05b1e2f5112ca93c7c6b4673ff42ca (diff)
downloadrspamd-13724fefdc9dbc31609938c06d6c99ba47d1729d.tar.gz
rspamd-13724fefdc9dbc31609938c06d6c99ba47d1729d.zip
Merge pull request #3332 from cgzones/compiler_new
Resolve various Compiler warnings
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_cryptobox.c4
-rw-r--r--src/lua/lua_task.c4
-rw-r--r--src/lua/lua_worker.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/lua/lua_cryptobox.c b/src/lua/lua_cryptobox.c
index 07b4888b9..784abea65 100644
--- a/src/lua/lua_cryptobox.c
+++ b/src/lua/lua_cryptobox.c
@@ -1008,7 +1008,7 @@ rspamd_lua_hash_create (const gchar *type)
}
else if (g_ascii_strcasecmp (type, "blake2") == 0) {
h->type = LUA_CRYPTOBOX_HASH_BLAKE2;
- posix_memalign ((void **)&h->content.h, _Alignof (rspamd_cryptobox_hash_state_t),
+ (void) !posix_memalign ((void **)&h->content.h, _Alignof (rspamd_cryptobox_hash_state_t),
sizeof (*h->content.h));
g_assert (h->content.h != NULL);
rspamd_cryptobox_hash_init (h->content.h, NULL, 0);
@@ -1045,7 +1045,7 @@ rspamd_lua_hash_create (const gchar *type)
}
else {
h->type = LUA_CRYPTOBOX_HASH_BLAKE2;
- posix_memalign ((void **)&h->content.h, _Alignof (rspamd_cryptobox_hash_state_t),
+ (void) !posix_memalign ((void **)&h->content.h, _Alignof (rspamd_cryptobox_hash_state_t),
sizeof (*h->content.h));
g_assert (h->content.h != NULL);
rspamd_cryptobox_hash_init (h->content.h, NULL, 0);
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 2d6257443..6f1eeaf3f 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -2423,13 +2423,13 @@ lua_task_has_urls (lua_State * L)
{
LUA_TRACE_POINT;
struct rspamd_task *task = lua_check_task (L, 1);
- gboolean need_emails = FALSE, ret = FALSE;
+ gboolean ret = FALSE;
gsize sz = 0;
if (task) {
if (task->message) {
if (lua_gettop (L) >= 2) {
- need_emails = lua_toboolean (L, 2);
+ lua_toboolean (L, 2);
}
if (kh_size (MESSAGE_FIELD (task, urls)) > 0) {
diff --git a/src/lua/lua_worker.c b/src/lua/lua_worker.c
index a286069cb..badc50a72 100644
--- a/src/lua/lua_worker.c
+++ b/src/lua/lua_worker.c
@@ -746,7 +746,7 @@ rspamd_lua_subprocess_io (EV_P_ ev_io *w, int revents)
/* Write reply to the child */
rspamd_socket_blocking (cbdata->sp[0]);
memset (rep, 0, sizeof (rep));
- (void)write (cbdata->sp[0], rep, sizeof (rep));
+ (void) !write (cbdata->sp[0], rep, sizeof (rep));
}
}
}
@@ -891,4 +891,4 @@ void
luaopen_worker (lua_State * L)
{
rspamd_lua_new_class (L, "rspamd{worker}", worker_reg);
-} \ No newline at end of file
+}