Module: kamailio
Branch: master
Commit: b5dd54e980bda1ed850d4899d2b6e3ce139832bb
URL:
https://github.com/kamailio/kamailio/commit/b5dd54e980bda1ed850d4899d2b6e3c…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2017-01-13T11:17:37+01:00
ims_usrloc_scscf: fix compiler warnings
ul_rpc.c:49:2: note: in expansion of macro
'LM_DBG'
LM_DBG("Dumping S-CSCF usrloc snapshot to file: [%.s]\n", filename.len,
filename.s);
^~~~~~
ucontact.c: In function 'print_ucontact':
ucontact.c:255:11: warning: unused variable 'st' [-Wunused-variable]
char* st = "";
^~
ucontact.c: In function 'new_ucontact':
ucontact.c:143:17: warning: 'prev' may be used uninitialized in this function
[-Wmaybe-uninitialized]
prev->next = curr;
~~~~~~~~~~~^~~~~~
impurecord.c:330:12: warning: 'rollback'
defined but not used [-Wunused-variable]
static str rollback = str_init("ROLLBACK");
^~~~~~~~
---
Modified: src/modules/ims_usrloc_scscf/impurecord.c
Modified: src/modules/ims_usrloc_scscf/ucontact.c
Modified: src/modules/ims_usrloc_scscf/ul_rpc.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b5dd54e980bda1ed850d4899d2b6e3c…
Patch:
https://github.com/kamailio/kamailio/commit/b5dd54e980bda1ed850d4899d2b6e3c…
---
diff --git a/src/modules/ims_usrloc_scscf/impurecord.c
b/src/modules/ims_usrloc_scscf/impurecord.c
index b4a289b..8c50577 100644
--- a/src/modules/ims_usrloc_scscf/impurecord.c
+++ b/src/modules/ims_usrloc_scscf/impurecord.c
@@ -327,7 +327,7 @@ static str autocommit_off = str_init("SET AUTOCOMMIT=0");
static str fail_isolation_level = str_init("SET TRANSACTION ISOLATION LEVEL READ
COMMITTED");
static str start_transaction = str_init("START TRANSACTION");
static str commit = str_init("COMMIT");
-static str rollback = str_init("ROLLBACK");
+/* static str rollback = str_init("ROLLBACK"); */
static str autocommit_on = str_init("SET AUTOCOMMIT=1");
static inline void start_dbtransaction() {
diff --git a/src/modules/ims_usrloc_scscf/ucontact.c
b/src/modules/ims_usrloc_scscf/ucontact.c
index e4c41fd..2b7e074 100644
--- a/src/modules/ims_usrloc_scscf/ucontact.c
+++ b/src/modules/ims_usrloc_scscf/ucontact.c
@@ -82,7 +82,8 @@ extern int db_mode;
*/
ucontact_t* new_ucontact(str* _dom, str* _aor, str* _contact, ucontact_info_t* _ci) {
ucontact_t *c;
- param_t *prev, *curr, *param;
+ param_t *prev = NULL;
+ param_t *curr, *param;
int first = 1;
c = (ucontact_t*) shm_malloc(sizeof (ucontact_t));
@@ -252,7 +253,6 @@ void free_ucontact(ucontact_t* _c) {
*/
void print_ucontact(FILE* _f, ucontact_t* _c) {
time_t t = time(0);
- char* st = "";
param_t * tmp;
fprintf(_f, "\t~~~Contact(%p) (refcount: %d)~~~\n", _c, _c->ref_count);
diff --git a/src/modules/ims_usrloc_scscf/ul_rpc.c
b/src/modules/ims_usrloc_scscf/ul_rpc.c
index d47c358..b3e3f2a 100644
--- a/src/modules/ims_usrloc_scscf/ul_rpc.c
+++ b/src/modules/ims_usrloc_scscf/ul_rpc.c
@@ -46,7 +46,7 @@ static void ul_rpc_snapshot(rpc_t* rpc, void *ctx) {
}
- LM_DBG("Dumping S-CSCF usrloc snapshot to file: [%.s]\n", filename.len,
filename.s);
+ LM_DBG("Dumping S-CSCF usrloc snapshot to file: [%.*s]\n", filename.len,
filename.s);
current_time = time(NULL);
t = localtime(¤t_time);