Module: kamailio
Branch: master
Commit: 730f65c06d0b8436e4a9cd0c1a62d2433819dc45
URL:
https://github.com/kamailio/kamailio/commit/730f65c06d0b8436e4a9cd0c1a62d24…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-05-12T19:52:52+02:00
core: explicit cast to (void*) for %p format printing
- 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
---
Modified: src/core/async_task.c
Modified: src/core/tcp_main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/730f65c06d0b8436e4a9cd0c1a62d24…
Patch:
https://github.com/kamailio/kamailio/commit/730f65c06d0b8436e4a9cd0c1a62d24…
---
diff --git a/src/core/async_task.c b/src/core/async_task.c
index 870241b0d3..ee50412790 100644
--- a/src/core/async_task.c
+++ b/src/core/async_task.c
@@ -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);
diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c
index 89e3b56b7c..fd5a644ee5 100644
--- a/src/core/tcp_main.c
+++ b/src/core/tcp_main.c
@@ -3606,7 +3606,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