[sr-dev] git:master:e0256096: htable: init vars in ht_dmq_handle_sync() to avoid compile warnings

Daniel-Constantin Mierla miconda at gmail.com
Mon Nov 19 09:11:59 CET 2018


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-11-19T09:07:33+01:00

htable: init vars in ht_dmq_handle_sync() to avoid compile warnings

---

Modified: src/modules/htable/ht_dmq.c

---

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

---

diff --git a/src/modules/htable/ht_dmq.c b/src/modules/htable/ht_dmq.c
index f1fe069f17..33dd72e8d4 100644
--- a/src/modules/htable/ht_dmq.c
+++ b/src/modules/htable/ht_dmq.c
@@ -537,17 +537,16 @@ int ht_dmq_send_sync(dmq_node_t* node) {
 int ht_dmq_handle_sync(srjson_doc_t* jdoc) {
 	LM_DBG("handling sync\n");
 
-	srjson_t* cells;
-	srjson_t* cell;
-	srjson_t* it;
-	str htname;
-	str cname;
-	int type;
-	int_str val;
-	int expire;
-	ht_t* ht;
-	time_t now;
-
+	srjson_t* cells = NULL;
+	srjson_t* cell = NULL;
+	srjson_t* it = NULL;
+	str htname = STR_NULL;
+	str cname = STR_NULL;
+	int type = 0;
+	int_str val = {0};
+	int expire = 0;
+	ht_t* ht = NULL;
+	time_t now = 0;
 
 	cells = jdoc->root->child;
 	cell = cells->child;




More information about the sr-dev mailing list