Module: kamailio
Branch: master
Commit: b6b1128cb108ed248e6bdd57d9530ab22d0a7d21
URL: https://github.com/kamailio/kamailio/commit/b6b1128cb108ed248e6bdd57d9530ab…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)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/b6b1128cb108ed248e6bdd57d9530ab…
Patch: https://github.com/kamailio/kamailio/commit/b6b1128cb108ed248e6bdd57d9530ab…
---
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);
Module: kamailio
Branch: master
Commit: 49fa527af4028904a13122517b61a6535837c4b6
URL: https://github.com/kamailio/kamailio/commit/49fa527af4028904a13122517b61a65…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2017-01-16T10:06:29+01:00
ims_icscf: fix compiler warnings
> cxdx_avp.c: In function 'cxdx_get_auth_data_item_answer':
> cxdx_avp.c:625:26: warning: comparison of constant '4' with boolean expression is always false [-Wbool-compare]
> if (!avp||!avp->data.len==4) *item_number=0;
> ^~
> cxdx_avp.c:625:26: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
---
Modified: src/modules/ims_icscf/cxdx_avp.c
---
Diff: https://github.com/kamailio/kamailio/commit/49fa527af4028904a13122517b61a65…
Patch: https://github.com/kamailio/kamailio/commit/49fa527af4028904a13122517b61a65…
---
diff --git a/src/modules/ims_icscf/cxdx_avp.c b/src/modules/ims_icscf/cxdx_avp.c
index 8d833b7..7dbcc36 100644
--- a/src/modules/ims_icscf/cxdx_avp.c
+++ b/src/modules/ims_icscf/cxdx_avp.c
@@ -622,7 +622,7 @@ int cxdx_get_auth_data_item_answer(AAAMessage *msg, AAA_AVP **auth_data,
avp = cdpb.AAAFindMatchingAVPList(list,0,AVP_IMS_SIP_Item_Number,
IMS_vendor_id_3GPP,0);
- if (!avp||!avp->data.len==4) *item_number=0;
+ if (!avp||avp->data.len!=4) *item_number=0;
else *item_number = get_4bytes(avp->data.s);
avp = cdpb.AAAFindMatchingAVPList(list,0,AVP_IMS_SIP_Authentication_Scheme,