Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
silentindark committed Nov 9, 2023
1 parent ca52557 commit 5bb54b0
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pjlib-util/src/pjlib-util/stun_simple_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ PJ_DEF(pj_status_t) pjstun_get_mapped_addr2(pj_pool_factory *pf,
}
}

TRACE_((THIS_FILE, " Pool usage=%d of %d", pj_pool_get_used_size(pool),
TRACE_((THIS_FILE, " Pool usage=%ld of %ld", pj_pool_get_used_size(pool),
pj_pool_get_capacity(pool)));

pj_pool_release(pool);
Expand Down
2 changes: 1 addition & 1 deletion pjlib/src/pj/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ static pj_hash_entry **find_entry( pj_pool_t *pool, pj_hash_table_t *ht,

entry = PJ_POOL_ALLOC_T(pool, pj_hash_entry);
PJ_LOG(6, ("hashtbl",
"%p: New p_entry %p created, pool used=%u, cap=%u",
"%p: New p_entry %p created, pool used=%lu, cap=%lu",
ht, entry, pj_pool_get_used_size(pool),
pj_pool_get_capacity(pool)));
}
Expand Down
14 changes: 7 additions & 7 deletions pjlib/src/pj/pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static pj_pool_block *pj_pool_create_block( pj_pool_t *pool, pj_size_t size)
PJ_CHECK_STACK();
pj_assert(size >= sizeof(pj_pool_block));

LOG((pool->obj_name, "create_block(sz=%u), cur.cap=%u, cur.used=%u",
LOG((pool->obj_name, "create_block(sz=%lu), cur.cap=%lu, cur.used=%lu",
size, pool->capacity, pj_pool_get_used_size(pool)));

/* Request memory from allocator. */
Expand Down Expand Up @@ -116,8 +116,8 @@ PJ_DEF(void*) pj_pool_allocate_find(pj_pool_t *pool, pj_size_t size)

/* If pool is configured NOT to expand, return error. */
if (pool->increment_size == 0) {
LOG((pool->obj_name, "Can't expand pool to allocate %u bytes "
"(used=%u, cap=%u)",
LOG((pool->obj_name, "Can't expand pool to allocate %lu bytes "
"(used=%lu, cap=%lu)",
size, pj_pool_get_used_size(pool), pool->capacity));
(*pool->callback)(pool, size);
return NULL;
Expand All @@ -142,7 +142,7 @@ PJ_DEF(void*) pj_pool_allocate_find(pj_pool_t *pool, pj_size_t size)
}

LOG((pool->obj_name,
"%u bytes requested, resizing pool by %u bytes (used=%u, cap=%u)",
"%lu bytes requested, resizing pool by %lu bytes (used=%lu, cap=%lu)",
size, block_size, pj_pool_get_used_size(pool), pool->capacity));

block = pj_pool_create_block(pool, block_size);
Expand Down Expand Up @@ -233,7 +233,7 @@ PJ_DEF(pj_pool_t*) pj_pool_create_int( pj_pool_factory *f, const char *name,
/* Pool initial capacity and used size */
pool->capacity = initial_size;

LOG((pool->obj_name, "pool created, size=%u", pool->capacity));
LOG((pool->obj_name, "pool created, size=%lu", pool->capacity));
return pool;
}

Expand Down Expand Up @@ -278,7 +278,7 @@ static void reset_pool(pj_pool_t *pool)
*/
PJ_DEF(void) pj_pool_reset(pj_pool_t *pool)
{
LOG((pool->obj_name, "reset(): cap=%d, used=%d(%d%%)",
LOG((pool->obj_name, "reset(): cap=%ld, used=%ld(%ld%%)",
pool->capacity, pj_pool_get_used_size(pool),
pj_pool_get_used_size(pool)*100/pool->capacity));

Expand All @@ -292,7 +292,7 @@ PJ_DEF(void) pj_pool_destroy_int(pj_pool_t *pool)
{
pj_size_t initial_size;

LOG((pool->obj_name, "destroy(): cap=%d, used=%d(%d%%), block0=%p-%p",
LOG((pool->obj_name, "destroy(): cap=%ld, used=%ld(%ld%%), block0=%p-%p",
pool->capacity, pj_pool_get_used_size(pool),
pj_pool_get_used_size(pool)*100/pool->capacity,
((pj_pool_block*)pool->block_list.next)->buf,
Expand Down
4 changes: 2 additions & 2 deletions pjlib/src/pj/pool_caching.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ static pj_pool_t* cpool_create_pool(pj_pool_factory *pf,
cp->capacity = 0;
}

PJ_LOG(6, (pool->obj_name, "pool reused, size=%u", pool->capacity));
PJ_LOG(6, (pool->obj_name, "pool reused, size=%lu", pool->capacity));
}

/* Put in used list. */
Expand Down Expand Up @@ -245,7 +245,7 @@ static void cpool_release_pool( pj_pool_factory *pf, pj_pool_t *pool)
}

/* Reset pool. */
PJ_LOG(6, (pool->obj_name, "recycle(): cap=%d, used=%d(%d%%)",
PJ_LOG(6, (pool->obj_name, "recycle(): cap=%ld, used=%ld(%ld%%)",
pool_capacity, pj_pool_get_used_size(pool),
pj_pool_get_used_size(pool)*100/pool_capacity));
pj_pool_reset(pool);
Expand Down
2 changes: 1 addition & 1 deletion pjlib/src/pj/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ static pj_status_t grow_heap(pj_timer_heap_t *ht)
pj_timer_entry_dup *new_dup;
#endif

PJ_LOG(6,(THIS_FILE, "Growing heap size from %d to %d",
PJ_LOG(6,(THIS_FILE, "Growing heap size from %ld to %ld",
ht->max_size, new_size));

// First grow the heap itself.
Expand Down
4 changes: 2 additions & 2 deletions pjsip/src/pjsip/sip_endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ PJ_DEF(pj_status_t) pjsip_endpt_schedule_timer_dbg(pjsip_endpoint *endpt,
const char *src_file,
int src_line)
{
PJ_LOG(6, (THIS_FILE, "pjsip_endpt_schedule_timer(entry=%p, delay=%u.%u)",
PJ_LOG(6, (THIS_FILE, "pjsip_endpt_schedule_timer(entry=%p, delay=%lu.%lu)",
entry, delay->sec, delay->msec));
return pj_timer_heap_schedule_dbg(endpt->timer_heap, entry, delay,
src_file, src_line);
Expand Down Expand Up @@ -817,7 +817,7 @@ PJ_DEF(pj_status_t) pjsip_endpt_schedule_timer_w_grp_lock_dbg(
int src_line)
{
PJ_LOG(6, (THIS_FILE, "pjsip_endpt_schedule_timer_w_grp_lock"
"(entry=%p, delay=%u.%u, grp_lock=%p)",
"(entry=%p, delay=%ld.%ld, grp_lock=%p)",
entry, delay->sec, delay->msec, grp_lock));
return pj_timer_heap_schedule_w_grp_lock_dbg(endpt->timer_heap, entry,
delay, id_val, grp_lock,
Expand Down

0 comments on commit 5bb54b0

Please sign in to comment.