소스 검색

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

(cherry picked from commit e0256096742a1f86e571949a5ffcf5e453401977)
Daniel-Constantin Mierla 6 년 전
부모
커밋
848252c1b2
1개의 변경된 파일10개의 추가작업 그리고 11개의 파일을 삭제
  1. 10 11
      src/modules/htable/ht_dmq.c

+ 10 - 11
src/modules/htable/ht_dmq.c

@@ -537,17 +537,16 @@ error:
 int ht_dmq_handle_sync(srjson_doc_t* jdoc) {
 int ht_dmq_handle_sync(srjson_doc_t* jdoc) {
 	LM_DBG("handling sync\n");
 	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;
 	cells = jdoc->root->child;
 	cell = cells->child;
 	cell = cells->child;