diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-22 15:24:46 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-22 15:32:33 +0000 |
commit | 5187b13d01f5f600f82f2487c3a3a5bd8862c463 (patch) | |
tree | 982ad5f83e28d4bab6ebfbe6e6dd484b986e38ea /src/lua | |
parent | 8807b9d2a9ff9b4d9a200aec60221d6f0951f9c1 (diff) | |
download | rspamd-5187b13d01f5f600f82f2487c3a3a5bd8862c463.tar.gz rspamd-5187b13d01f5f600f82f2487c3a3a5bd8862c463.zip |
[Minor] Fix some warnings
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_task.c | 4 | ||||
-rw-r--r-- | src/lua/lua_util.c | 5 |
2 files changed, 1 insertions, 8 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 643737086..bd7d693d0 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -1345,12 +1345,10 @@ static gint lua_task_set_pre_result (lua_State * L) { struct rspamd_task *task = lua_check_task (L, 1); - struct rspamd_config *cfg; gchar *action_str; gint action = METRIC_ACTION_MAX; if (task != NULL) { - cfg = task->cfg; if (lua_type (L, 2) == LUA_TNUMBER) { action = lua_tointeger (L, 2); @@ -1378,6 +1376,7 @@ lua_task_set_pre_result (lua_State * L) else { task->pre_result.str = "unknown"; } + msg_info_task ("<%s>: set pre-result to %s: '%s'", task->message_id, rspamd_action_to_str (action), task->pre_result.str); @@ -4225,7 +4224,6 @@ lua_task_disable_action (lua_State *L) { struct rspamd_task *task = lua_check_task (L, 1); const gchar *action_name; - struct rspamd_metric_result *metric_res; gint action; action_name = luaL_checkstring (L, 2); diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c index ad38e771e..a14de69f3 100644 --- a/src/lua/lua_util.c +++ b/src/lua/lua_util.c @@ -2154,14 +2154,9 @@ lua_util_readline (lua_State *L) static gint lua_util_readpassphrase (lua_State *L) { - const gchar *prompt = NULL; gchar test_password[8192]; gsize r; - if (lua_type (L, 1) == LUA_TSTRING) { - prompt = lua_tostring (L, 1); - } - r = rspamd_read_passphrase (test_password, sizeof (test_password), 0, NULL); if (r > 0) { |