Module: kamailio
Branch: master
Commit: 730f65c06d0b8436e4a9cd0c1a62d2433819dc45
URL: 
https://github.com/kamailio/kamailio/commit/730f65c06d0b8436e4a9cd0c1a62d2433819dc45

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
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/730f65c06d0b8436e4a9cd0c1a62d2433819dc45.diff
Patch: 
https://github.com/kamailio/kamailio/commit/730f65c06d0b8436e4a9cd0c1a62d2433819dc45.patch

---

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


_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to