Skip to content

Commit

Permalink
ims_usrloc_scscf: fix compiler warnings
Browse files Browse the repository at this point in the history
> 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");
>             ^~~~~~~~
  • Loading branch information
linuxmaniac committed Jan 13, 2017
1 parent 77d8800 commit b5dd54e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/modules/ims_usrloc_scscf/impurecord.c
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/modules/ims_usrloc_scscf/ucontact.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/ims_usrloc_scscf/ul_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(&current_time);
Expand Down

0 comments on commit b5dd54e

Please sign in to comment.