[sr-dev] git:master:5d157208: modules/db_text: clean gcc warning

Victor Seva linuxmaniac at torreviejawireless.org
Sat Jun 20 09:01:55 CEST 2015


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

Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date: 2015-06-20T09:00:44+02:00

modules/db_text: clean gcc warning

dbt_raw_util.c: In function 'dbt_build_where':
dbt_raw_util.c:172:6: warning: unused variable 'n' [-Wunused-variable]
  int n, l;

---

Modified: modules/db_text/dbt_raw_util.c

---

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

---

diff --git a/modules/db_text/dbt_raw_util.c b/modules/db_text/dbt_raw_util.c
index 97012cc..ffbfa3b 100644
--- a/modules/db_text/dbt_raw_util.c
+++ b/modules/db_text/dbt_raw_util.c
@@ -169,7 +169,7 @@ int dbt_build_where(char* where, db_key_t** _k, db_op_t** _o, db_val_t** _v)
 	char** _o1 = NULL;
 	db_val_t* _v1 = NULL;
 	regmatch_t* matches = NULL;
-	int n, l;
+	int l;
 	int len;
 	regex_t preg;
 	int offset = 0;
@@ -239,11 +239,11 @@ int dbt_build_where(char* where, db_key_t** _k, db_op_t** _o, db_val_t** _v)
 			_v1[idx].val.str_val.s = pkg_malloc(l+1);
 			strncpy(_v1[idx].val.str_val.s, buffer+matches[5].rm_so, l);
 		}
-
-//		for(n=0; n < MAX_MATCH; n++) {
-//			LM_ERR("MATCH RESULT %d - %d,%d\n", n, matches[n].rm_so, matches[n].rm_eo);
-//		}
-
+/*
+		for(int n=0; n < MAX_MATCH; n++) {
+			LM_ERR("MATCH RESULT %d - %d,%d\n", n, matches[n].rm_so, matches[n].rm_eo);
+		}
+*/
 		if(matches[0].rm_eo != -1)
 			offset += matches[0].rm_eo;
 




More information about the sr-dev mailing list