Browse Source

[Minor] Fix some meaningful compile warnings

tags/1.9.0
Vsevolod Stakhov 5 years ago
parent
commit
534c9aca14
3 changed files with 5 additions and 4 deletions
  1. 2
    1
      src/libutil/str_util.c
  2. 1
    1
      src/lua/lua_cryptobox.c
  3. 2
    2
      src/lua/lua_util.c

+ 2
- 1
src/libutil/str_util.c View File

@@ -2754,8 +2754,9 @@ rspamd_str_make_utf_valid (const gchar *src, gsize slen, gsize *dstlen)
GString *dst;
const gchar *last;
gchar *dchar;
gsize i, valid, prev;
gsize valid, prev;
UChar32 uc;
gint32 i;

if (src == NULL) {
return NULL;

+ 1
- 1
src/lua/lua_cryptobox.c View File

@@ -1875,7 +1875,7 @@ lua_cryptobox_encrypt_cookie (lua_State *L)
}

if (cookie_len > sizeof (padded_cookie) - 1) {
return luaL_error (L, "cookie is too long %d", (gint)padded_cookie);
return luaL_error (L, "cookie is too long %d", (gint)cookie_len);
}

/* Fill nonce */

+ 2
- 2
src/lua/lua_util.c View File

@@ -758,7 +758,7 @@ lua_util_config_from_ucl (lua_State *L)
int_options = parse_config_options(str_options);
}
else {
msg_err_config ("config_from_ucl: second parameter is expected to be string");
msg_err ("config_from_ucl: second parameter is expected to be string");
ucl_object_unref (obj);
lua_pushnil (L);
}
@@ -773,7 +773,7 @@ lua_util_config_from_ucl (lua_State *L)
top = rspamd_rcl_config_init (cfg, NULL);

if (!rspamd_rcl_parse (top, cfg, cfg, cfg->cfg_pool, cfg->rcl_obj, &err)) {
msg_err_config ("rcl parse error: %s", err->message);
msg_err ("rcl parse error: %s", err->message);
ucl_object_unref (obj);
lua_pushnil (L);
}

Loading…
Cancel
Save