Skip to content

Commit

Permalink
call_obj: fix compile warning, size_t is unsigned int on 32 bit archi…
Browse files Browse the repository at this point in the history
…tectures
  • Loading branch information
henningw committed Sep 25, 2019
1 parent ec89ce2 commit 2a2780c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/call_obj/cobj.c
Expand Up @@ -112,15 +112,15 @@ int cobj_init(int start, int end)

size_t total_size = (1 + end - start); /* [start, end] */
size_t array_size = total_size * sizeof(co_object_t);
LM_DBG("Element size: %lu\n", sizeof(co_object_t));
LM_DBG("List element size: %lu\n", sizeof(cobj_elem_t));
LM_DBG("Element size: %lu\n", (long)sizeof(co_object_t));
LM_DBG("List element size: %lu\n", (long)sizeof(cobj_elem_t));

co_data->ring = (co_object_t*)shm_malloc(array_size);
if (!co_data->ring) {
LM_ERR("Cannot allocate shm memory for ring in call object\n");
return -1;
}
LM_DBG("Allocated %lu bytes for the ring\n", array_size);
LM_DBG("Allocated %lu bytes for the ring\n", (long)array_size);

/*
* Initialize lock.
Expand Down

0 comments on commit 2a2780c

Please sign in to comment.