Skip to content

Commit

Permalink
core: explicit cast to (void*) for %p format printing
Browse files Browse the repository at this point in the history
- c standard required that for a defined value and in some cases the
code analysers complain, especially when reading the value via
socket/file descriptor

(cherry picked from commit 730f65c)
  • Loading branch information
miconda authored and henningw committed May 13, 2020
1 parent 79bc074 commit 582d4c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/core/async_task.c
Expand Up @@ -277,8 +277,8 @@ int async_task_run(int idx)
continue;
}
if(ptask->exec!=NULL) {
LM_DBG("task executed [%p] (%p/%p)\n", ptask,
ptask->exec, ptask->param);
LM_DBG("task executed [%p] (%p/%p)\n", (void*)ptask,
(void*)ptask->exec, (void*)ptask->param);
ptask->exec(ptask->param);
}
shm_free(ptask);
Expand Down
2 changes: 1 addition & 1 deletion src/core/tcp_main.c
Expand Up @@ -3369,7 +3369,7 @@ inline static int handle_tcp_child(struct tcp_child* tcp_c, int fd_i)
_wbufq_non_empty(tcpconn) )){
if (unlikely(TICKS_GE(t, tcpconn->wbuf_q.wr_timeout))){
LM_DBG("wr. timeout on CONN_RELEASE for %p refcnt= %d\n",
tcpconn, atomic_get(&tcpconn->refcnt));
(void*)tcpconn, atomic_get(&tcpconn->refcnt));
/* timeout */
if (unlikely(tcpconn->state==S_CONN_CONNECT)){
#ifdef USE_DST_BLACKLIST
Expand Down

0 comments on commit 582d4c9

Please sign in to comment.