Module: kamailio Branch: master Commit: 03e6757d78d4439ce16df3d6e7f8023993c17df7 URL: https://github.com/kamailio/kamailio/commit/03e6757d78d4439ce16df3d6e7f80239...
Author: Victor Seva linuxmaniac@torreviejawireless.org Committer: Victor Seva linuxmaniac@torreviejawireless.org Date: 2017-01-13T11:51:49+01:00
cdp: fix compiler warnings
acctstatemachine.c: In function 'update_gsu_response_timers': acctstatemachine.c:80:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (mscc_avp_list.head); ^~ acctstatemachine.c:81:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' AAAFreeAVPList(&mscc_avp_list); ^~~~~~~~~~~~~~
authstatemachine.c: In function 'add_auth_session_timers': authstatemachine.c:234:32: warning: 'lifetime' may be used uninitialized in this function [-Wmaybe-uninitialized] x->last_requested_timeout = lifetime; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
---
Modified: src/modules/cdp/acctstatemachine.c Modified: src/modules/cdp/authstatemachine.c
---
Diff: https://github.com/kamailio/kamailio/commit/03e6757d78d4439ce16df3d6e7f80239... Patch: https://github.com/kamailio/kamailio/commit/03e6757d78d4439ce16df3d6e7f80239...
---
diff --git a/src/modules/cdp/acctstatemachine.c b/src/modules/cdp/acctstatemachine.c index 29536fb..9d1a451 100644 --- a/src/modules/cdp/acctstatemachine.c +++ b/src/modules/cdp/acctstatemachine.c @@ -77,7 +77,7 @@ void update_gsu_response_timers(cdp_cc_acc_session_t* session, AAAMessage* msg) mscc_avp = mscc_avp->next; }
- if (mscc_avp_list.head); + if (mscc_avp_list.head) AAAFreeAVPList(&mscc_avp_list); if (y.head) diff --git a/src/modules/cdp/authstatemachine.c b/src/modules/cdp/authstatemachine.c index eaefb0b..db0e244 100644 --- a/src/modules/cdp/authstatemachine.c +++ b/src/modules/cdp/authstatemachine.c @@ -157,7 +157,8 @@ void add_auth_session_timers(cdp_auth_session_t *x, AAAMessage *msg) { AAA_AVP *avp; char data[4]; uint32_t v; - uint32_t lifetime, timeout, grace; + uint32_t lifetime = 0; + uint32_t timeout, grace;
avp = AAAFindMatchingAVP(msg, 0, AVP_Authorization_Lifetime, 0, 0); if (!avp) {