diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-04-06 16:27:38 +0200 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2020-04-11 14:06:55 +0200 |
commit | 0eee0523918a72f45bf3ffe3cd42c3182ed6f95e (patch) | |
tree | 592290d08e02f90e8b606a5bf04611b45e89a797 | |
parent | 11a64f8b09f9c50b4d7ee0a757ff8bb025b00ba0 (diff) | |
download | rspamd-0eee0523918a72f45bf3ffe3cd42c3182ed6f95e.tar.gz rspamd-0eee0523918a72f45bf3ffe3cd42c3182ed6f95e.zip |
[Minor] Remove unused-but-set variables
../src/libserver/url.c: In function ‘rspamd_url_host_set_add’:
../src/libserver/url.c:3808:11: warning: variable ‘k’ set but not used [-Wunused-but-set-variable]
3808 | khiter_t k;
| ^
../src/lua/lua_task.c: In function ‘lua_task_has_urls’:
../src/lua/lua_task.c:2406:11: warning: variable ‘need_emails’ set but not used [-Wunused-but-set-variable]
2406 | gboolean need_emails = FALSE, ret = FALSE;
| ^~~~~~~~~~~
-rw-r--r-- | src/libserver/url.c | 5 | ||||
-rw-r--r-- | src/lua/lua_task.c | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/libserver/url.c b/src/libserver/url.c index 6aceb8fa6..db89073f5 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -3941,11 +3941,10 @@ bool rspamd_url_host_set_add (khash_t (rspamd_url_host_hash) *set, struct rspamd_url *u) { - khiter_t k; gint r; if (set) { - k = kh_put (rspamd_url_host_hash, set, u, &r); + kh_put (rspamd_url_host_hash, set, u, &r); if (r == 0) { return false; @@ -3991,4 +3990,4 @@ rspamd_url_host_set_has (khash_t (rspamd_url_host_hash) *set, struct rspamd_url } return false; -}
\ No newline at end of file +} 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) { |