diff --git a/cfg.y b/cfg.y index 3b4660e045b..6f260fc5005 100644 --- a/cfg.y +++ b/cfg.y @@ -622,7 +622,7 @@ port: NUMBER { $$=$1; } portrange: portrange COMMA NUMBER MINUS NUMBER { IFOR(); if ($3 > $5) { - yyerrorf("invalid port range (%d > %d)\n", $3, $5); + yyerrorf("invalid port range (%d > %d)\n", (int)$3, (int)$5); YYABORT; } pr_tmp = mk_port_range($3, $5); @@ -644,7 +644,7 @@ portrange: portrange COMMA NUMBER MINUS NUMBER { IFOR(); } | NUMBER MINUS NUMBER { IFOR(); if ($1 > $3) { - yyerrorf("invalid port range (%d > %d)\n", $1, $3); + yyerrorf("invalid port range (%d > %d)\n", (int)$1, (int)$3); YYABORT; } $$=mk_port_range($1, $3); diff --git a/dprint.c b/dprint.c index 417faba72cb..64233c88cfc 100644 --- a/dprint.c +++ b/dprint.c @@ -427,7 +427,7 @@ static int log_print_json(str *buf, enum log_json_format json_fmt, char *time, l = log_escape_json_buf(log_msg_buf, l, p, buf->len - len - rlen - 1); if (l < 0) { - stderr_dprint_tmp_err("failed to escape log message!\n",l); + stderr_dprint_tmp_err("failed to escape log message!\n"); return -1; } diff --git a/lib/dbg/struct_hist.c b/lib/dbg/struct_hist.c index ef57793fff5..ff219e52571 100644 --- a/lib/dbg/struct_hist.c +++ b/lib/dbg/struct_hist.c @@ -274,6 +274,7 @@ int _sh_log(osips_realloc_f realloc_f, struct struct_hist *sh, if (!new) { lock_release(&sh->wlock); LM_ERR("oom\n"); + va_end(ap); return -1; } /* CAREFUL: newly added actions are not memset, for speed reasons! */ diff --git a/lib/hash.c b/lib/hash.c index 9aa50a6b016..8f2129dc89d 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -28,7 +28,7 @@ gen_hash_t *hash_init(unsigned int size) gen_lock_set_t *locks = NULL; /* initialized the hash table */ - for (n=0 ; n<(8*sizeof(n)) ; n++) { + for (n=0 ; n<(8*sizeof(n) - 1) ; n++) { if (size==(1<ip, ss, sc, &ck, &ik, spi_ps, spi_pc); + ctx = ipsec_ctx_new(&sa, &user->ip, ss, sc, &ck, &ik, spi_pc, spi_ps); if (!ctx) { LM_ERR("could not allocate new IPSec ctx\n"); goto release_user; diff --git a/modules/usrloc/ul_mi.c b/modules/usrloc/ul_mi.c index 07318d0348d..2b7f1d0eeb3 100644 --- a/modules/usrloc/ul_mi.c +++ b/modules/usrloc/ul_mi.c @@ -115,7 +115,7 @@ static inline int mi_add_aor_node(mi_item_t *aor_item, urecord_t* r, if (add_mi_string(ct_item, MI_SSTR("Contact"), c->c.s, c->c.len) < 0) return -1; - if (add_mi_string_fmt(ct_item, MI_SSTR("ContactID"), "%llu", c->contact_id) < 0) + if (add_mi_string_fmt(ct_item, MI_SSTR("ContactID"), "%lu", c->contact_id) < 0) return -1; if (c->expires == 0) {