Skip to content

Commit

Permalink
Fixed a few more warnings on 64 bit platforms
Browse files Browse the repository at this point in the history
(cherry picked from commit dfc4a8f)
  • Loading branch information
danpascu committed May 28, 2019
1 parent 557e7b7 commit 36c7507
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bin_interface.c
Expand Up @@ -58,7 +58,7 @@ int bin_init(bin_packet_t *packet, str *capability, int packet_type,
short version, int length)
{
if (length != 0 && length < MIN_BIN_PACKET_SIZE + capability->len) {
LM_ERR("Length parameter has to be greater than: %u\n",
LM_ERR("Length parameter has to be greater than: %zu\n",
MIN_BIN_PACKET_SIZE + capability->len);
return -1;
}
Expand Down
4 changes: 2 additions & 2 deletions modules/cachedb_mongodb/cachedb_mongodb_dbase.c
Expand Up @@ -1974,7 +1974,7 @@ int mongo_cdb_dict_to_bson(const cdb_dict_t *dict, bson_t *out_doc)
if (!bson_append_int64(out_doc, key.s, key.len,
pair->val.val.i64)) {
LM_ERR("failed to append %.*s: %lld\n", key.len,
key.s, pair->val.val.i64);
key.s, (long long)pair->val.val.i64);
goto out_err;
}
break;
Expand Down Expand Up @@ -2073,7 +2073,7 @@ int mongo_con_update(cachedb_con *con, const cdb_filter_t *row_filter,
case CDB_INT64:
if (!bson_append_int64(&set_keys, key.s, key.len,
pair->val.val.i64)) {
LM_ERR("failed to append i64 val: %lld\n", pair->val.val.i64);
LM_ERR("failed to append i64 val: %lld\n", (long long)pair->val.val.i64);
ret = -1;
goto out;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/mid_registrar/lookup.c
Expand Up @@ -209,7 +209,7 @@ int mid_reg_lookup(struct sip_msg* req, void* _t, str* flags_s, str* uri)
}
}

LM_DBG("getting ucontact from contact_id %llu\n", contact_id);
LM_DBG("getting ucontact from contact_id %llu\n", (unsigned long long)contact_id);

ptr = ul_api.get_ucontact_from_id((udomain_t *)_t, contact_id, &r);
if (!ptr) {
Expand Down
2 changes: 1 addition & 1 deletion modules/mid_registrar/save.c
Expand Up @@ -383,7 +383,7 @@ static int overwrite_req_contacts(struct sip_msg *req,
"<sip:%.*s@%.*s:%.*s;%.*s=%llu%.*s>;expires=%d",
new_username.len, new_username.s,
adv_host->len, adv_host->s, adv_port->len, adv_port->s,
ctid_param.len, ctid_param.s, ctid,
ctid_param.len, ctid_param.s, (unsigned long long)ctid,
extra_ct_params.len, extra_ct_params.s, expires);
} else {
LM_DBG("username insertion\n");
Expand Down
4 changes: 2 additions & 2 deletions modules/nathelper/nathelper.c
Expand Up @@ -1666,7 +1666,7 @@ ping_checker_timer(unsigned int ticks, void *timer_idx)
lock_hash(cell->hash_id);

LM_DBG("ping expiring ping cell %llu state=%d\n",
cell->ct_coords, cell->state);
(unsigned long long)cell->ct_coords, cell->state);

if (cell->state == PING_CELL_STATE_ANSWERED) {
unlock_hash(cell->hash_id);
Expand Down Expand Up @@ -1722,7 +1722,7 @@ ping_checker_timer(unsigned int ticks, void *timer_idx)
cell->state = PING_CELL_STATE_WAITING;

LM_DBG("moving ping cell %llu into WAIT timer with state=%d\n",
cell->ct_coords, cell->state);
(unsigned long long)cell->ct_coords, cell->state);

/* insert into waiting time */
list_add_tail( &cell->t_linker, &table->timer_list.wt_timer);
Expand Down
4 changes: 2 additions & 2 deletions modules/nathelper/sip_pinger.h
Expand Up @@ -136,7 +136,7 @@ static int parse_branch(str branch)
unlock_hash(hash_id);
return 0;
}
LM_DBG("ping received for %llu\n", ct_coords);
LM_DBG("ping received for %llu\n", (unsigned long long)ct_coords);

sipping_latency =
(timeval_st.tv_sec - p_cell->last_send_time.tv_sec) * 1000000 +
Expand Down Expand Up @@ -287,7 +287,7 @@ build_branch(char *branch, int *size,
lock_release(&htable->timer_list.mutex);

LM_DBG("ping cell acquired (new=%d, old_state=%d) for %llu\n",
(old_state==PING_CELL_STATE_NONE)?1:0, old_state, ct_coords);
(old_state==PING_CELL_STATE_NONE)?1:0, old_state, (unsigned long long)ct_coords);
} else {
label = sipping_callid_cnt;
}
Expand Down

0 comments on commit 36c7507

Please sign in to comment.