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

Author: Victor Seva <linuxman...@torreviejawireless.org>
Committer: Victor Seva <linuxman...@torreviejawireless.org>
Date: 2017-01-16T10:47:54+01:00

cdp: fix compiler warnings

> In file included from ../../core/mem/shm.h:39:0,
>                  from ../../core/mem/shm_mem.h:34,
>                  from utils.h:50,
>                  from diameter_peer.c:49:
> ../../core/mem/../lock_ops.h:88:28: warning: 'futex_release' is static but 
> used in inline function 'dp_del_pid' which is not static
>  #define lock_release(lock) futex_release(lock)
>                             ^
> diameter_peer.c:141:2: note: in expansion of macro 'lock_release'
>   lock_release(pid_list_lock);
>   ^~~~~~~~~~~~
> ../../core/mem/../lock_ops.h:88:28: warning: 'futex_release' is static but 
> used in inline function 'dp_del_pid' which is not static
>  #define lock_release(lock) futex_release(lock)
>                             ^
> diameter_peer.c:130:3: note: in expansion of macro 'lock_release'
>    lock_release(pid_list_lock);
>    ^~~~~~~~~~~~
> ../../core/mem/../lock_ops.h:87:25: warning: 'futex_get' is static but used 
> in inline function 'dp_del_pid' which is not static
>  #define lock_get(lock)  futex_get(lock)
>                          ^
> diameter_peer.c:127:2: note: in expansion of macro 'lock_get'
>   lock_get(pid_list_lock);
>   ^~~~~~~~
> ../../core/mem/../lock_ops.h:88:28: warning: 'futex_release' is static but 
> used in inline function 'dp_last_pid' which is not static
>  #define lock_release(lock) futex_release(lock)
>                             ^
> diameter_peer.c:116:2: note: in expansion of macro 'lock_release'
>   lock_release(pid_list_lock);
>   ^~~~~~~~~~~~
> ../../core/mem/../lock_ops.h:87:25: warning: 'futex_get' is static but used 
> in inline function 'dp_last_pid' which is not static
>  #define lock_get(lock)  futex_get(lock)
>                          ^
> diameter_peer.c:113:2: note: in expansion of macro 'lock_get'
>   lock_get(pid_list_lock);
>   ^~~~~~~~
> ../../core/mem/../lock_ops.h:88:28: warning: 'futex_release' is static but 
> used in inline function 'dp_add_pid' which is not static
>  #define lock_release(lock) futex_release(lock)
>                             ^
> diameter_peer.c:103:2: note: in expansion of macro 'lock_release'
>   lock_release(pid_list_lock);
>   ^~~~~~~~~~~~
> ../../core/mem/../lock_ops.h:88:28: warning: 'futex_release' is static but 
> used in inline function 'dp_add_pid' which is not static
>  #define lock_release(lock) futex_release(lock)
>                             ^
> diameter_peer.c:94:3: note: in expansion of macro 'lock_release'
>    lock_release(pid_list_lock);
>    ^~~~~~~~~~~~
> ../../core/mem/../lock_ops.h:87:25: warning: 'futex_get' is static but used 
> in inline function 'dp_add_pid' which is not static
>  #define lock_get(lock)  futex_get(lock)
>                          ^
> diameter_peer.c:90:2: note: in expansion of macro 'lock_get'
>   lock_get(pid_list_lock);
>   ^~~~~~~~

---

Modified: src/modules/cdp/diameter_peer.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/b6b1128cb108ed248e6bdd57d9530ab22d0a7d21.diff
Patch: 
https://github.com/kamailio/kamailio/commit/b6b1128cb108ed248e6bdd57d9530ab22d0a7d21.patch

---

diff --git a/src/modules/cdp/diameter_peer.c b/src/modules/cdp/diameter_peer.c
index 782011b..7efc867 100644
--- a/src/modules/cdp/diameter_peer.c
+++ b/src/modules/cdp/diameter_peer.c
@@ -84,7 +84,7 @@ extern gen_lock_t *peer_list_lock;    /**< lock for the list 
of peers */
  * @param pid newly forked pid
  * @returns 1 on success or 0 on error
  */
-inline int dp_add_pid(pid_t pid)
+static inline int dp_add_pid(pid_t pid)
 {
        pid_list_t *n;
        lock_get(pid_list_lock);
@@ -107,7 +107,7 @@ inline int dp_add_pid(pid_t pid)
 /**
  * Returns the last pid in the local process list.
  */
-inline int dp_last_pid()
+static inline int dp_last_pid()
 {
        int pid;
        lock_get(pid_list_lock);
@@ -121,7 +121,7 @@ inline int dp_last_pid()
  * Delete a pid from the process list
  * @param pid - the pid to remove
  */
-inline void dp_del_pid(pid_t pid)
+static inline void dp_del_pid(pid_t pid)
 {
        pid_list_t *i;
        lock_get(pid_list_lock);


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to