res = pjsip_auth_clt_set_credentials(auth_sess, cred_count, creds_array);
ast_free(creds_array);
if (res == PJ_SUCCESS) {
- ast_debug(3, "Set %"PRIu64" credentials in auth session\n", cred_count);
+ ast_debug(3, "Set %zu credentials in auth session\n", cred_count);
} else {
- ast_log(LOG_ERROR, "Failed to set %"PRIu64" credentials in auth session\n", cred_count);
+ ast_log(LOG_ERROR, "Failed to set %zu credentials in auth session\n", cred_count);
}
cleanup:
static int mailbox_to_num(const char *mailbox, size_t *num)
{
+ uintmax_t tmp;
const char *p = strchr(mailbox, '~');
if (!p) {
return -1;
}
- if (ast_str_to_umax(++p, num)) {
+ if (ast_str_to_umax(++p, &tmp)) {
ast_log(LOG_ERROR, "Unable to convert mailbox '%s' to numeric\n", mailbox);
return -1;
}
+ *num = (size_t) tmp;
return 0;
}
int i;
struct stasis_subscription_change *data;
- ast_test_status_update(test, "Messages received: %ld Final? %s\n", cts->consumer->messages_rxed_len,
+ ast_test_status_update(test, "Messages received: %zu Final? %s\n", cts->consumer->messages_rxed_len,
cts->consumer->complete ? "yes" : "no");
for (i = 0; i < cts->consumer->messages_rxed_len; i++) {
data = stasis_message_data(cts->consumer->messages_rxed[i]);
static int validate_data(const char *id, struct foo_data *foo)
{
size_t num;
+ uintmax_t tmp;
- if (ast_str_to_umax(id, &num)) {
+ if (ast_str_to_umax(id, &tmp)) {
ast_log(LOG_ERROR, "Unable to convert the state's id '%s' to numeric\n", id);
return -1;
}
+ num = (size_t) tmp;
running_total += num;
{
struct stasis_message *msg;
struct foo_data *foo;
+ uintmax_t tmp;
foo = ao2_alloc(sizeof(*foo), NULL);
if (!foo) {
return NULL;
}
- if (ast_str_to_umax(id, &foo->bar)) {
+ if (ast_str_to_umax(id, &tmp)) {
ast_log(LOG_ERROR, "Unable to convert the state's id '%s' to numeric\n", id);
ao2_ref(foo, -1);
return NULL;
}
+ foo->bar = (size_t) tmp;
msg = stasis_message_create_full(foo_type(), foo, NULL);
if (!msg) {