core: explicit cast to (void*) for %p format printing
authorDaniel-Constantin Mierla <miconda@gmail.com>
Tue, 12 May 2020 17:52:52 +0000 (19:52 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Tue, 12 May 2020 17:52:52 +0000 (19:52 +0200)
- 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

src/core/async_task.c
src/core/tcp_main.c

index 870241b..ee50412 100644 (file)
@@ -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);
index 89e3b56..fd5a644 100644 (file)
@@ -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