rdns_make_inet_socket (int type, struct addrinfo *addr, struct sockaddr **psockaddr,
socklen_t *psocklen)
{
- int fd, r, s_error;
- socklen_t optlen;
+ int fd = -1;
struct addrinfo *cur;
cur = addr;
static int
rdns_make_unix_socket (const char *path, struct sockaddr_un *addr, int type)
{
- int fd = -1, s_error, r, serrno;
- socklen_t optlen;
+ int fd = -1, serrno;
if (path == NULL) {
return -1;
struct sockaddr *cpy;
cpy = calloc (1, sizeof (un));
- *psockaddr = sizeof (un);
+ *psocklen = sizeof (un);
if (cpy == NULL) {
close (r);
free (entry->content.soa.mname);
free (entry->content.soa.admin);
break;
+ default:
+ break;
}
free (entry);
}
signal (SIGILL, old_handler);
#endif
+ (void)rd; /* Silence warning */
+
/* We actually never return here if SIGILL has been caught */
return ok == 1;
}
case CPUID_RDRAND:
rspamd_printf_gstring (buf, "rdrand, ");
break;
+ default:
+ break; /* Silence warning */
}
}
}
static inline uint32_t
rspamd_entry_hash (const char *str)
{
- return rspamd_cryptobox_fast_hash (str, strlen (str), rspamd_hash_seed ());
+ return (guint)rspamd_cryptobox_fast_hash (str, strlen (str), rspamd_hash_seed ());
}
static inline int
len = strlen ((const gchar *)key);
- return rspamd_cryptobox_fast_hash (key, len, rspamd_hash_seed ());
+ return (guint)rspamd_cryptobox_fast_hash (key, len, rspamd_hash_seed ());
}
gboolean
{
const rspamd_ftok_t *f = key;
- return t1ha (f->begin, f->len, rspamd_hash_seed ());
+ return (guint)rspamd_cryptobox_fast_hash (f->begin, f->len, rspamd_hash_seed ());
}
gboolean
gchar *
-rspamd_str_make_utf_valid (const gchar *src, gsize slen, gsize *dstlen)
+rspamd_str_make_utf_valid (const guchar *src, gsize slen, gsize *dstlen)
{
GString *dst;
const gchar *last;
* @param dstelen
* @return
*/
-gchar * rspamd_str_make_utf_valid (const gchar *src, gsize slen, gsize *dstlen);
+gchar * rspamd_str_make_utf_valid (const guchar *src, gsize slen, gsize *dstlen);
/**
* Strips characters in `strip_chars` from start and end of the GString
rspamadm_lua_error_handler (struct rspamd_http_connection_entry *conn_ent,
GError *err)
{
- struct rspamadm_lua_repl_session *session = conn_ent->ud;
-
rspamd_fprintf (stderr, "http error occurred: %s\n", err->message);
}