Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fix warnings" #3788

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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=%ld of %ld", pj_pool_get_used_size(pool),
TRACE_((THIS_FILE, " Pool usage=%d of %d", 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=%lu, cap=%lu",
"%p: New p_entry %p created, pool used=%u, cap=%u",
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=%lu), cur.cap=%lu, cur.used=%lu",
LOG((pool->obj_name, "create_block(sz=%u), cur.cap=%u, cur.used=%u",
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 %lu bytes "
"(used=%lu, cap=%lu)",
LOG((pool->obj_name, "Can't expand pool to allocate %u bytes "
"(used=%u, cap=%u)",
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,
"%lu bytes requested, resizing pool by %lu bytes (used=%lu, cap=%lu)",
"%u bytes requested, resizing pool by %u bytes (used=%u, cap=%u)",
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=%lu", pool->capacity));
LOG((pool->obj_name, "pool created, size=%u", 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=%ld, used=%ld(%ld%%)",
LOG((pool->obj_name, "reset(): cap=%d, used=%d(%d%%)",
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=%ld, used=%ld(%ld%%), block0=%p-%p",
LOG((pool->obj_name, "destroy(): cap=%d, used=%d(%d%%), 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=%lu", pool->capacity));
PJ_LOG(6, (pool->obj_name, "pool reused, size=%u", 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=%ld, used=%ld(%ld%%)",
PJ_LOG(6, (pool->obj_name, "recycle(): cap=%d, used=%d(%d%%)",
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 %ld to %ld",
PJ_LOG(6,(THIS_FILE, "Growing heap size from %d to %d",
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=%lu.%lu)",
PJ_LOG(6, (THIS_FILE, "pjsip_endpt_schedule_timer(entry=%p, delay=%u.%u)",
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=%ld.%ld, grp_lock=%p)",
"(entry=%p, delay=%u.%u, 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