[sr-dev] git:master:6af1dee2: ims_registrar_pcscf: fix compiler warnings

Victor Seva linuxmaniac at torreviejawireless.org
Mon Jan 16 10:20:15 CET 2017


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

Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date: 2017-01-16T10:14:47+01:00

ims_registrar_pcscf: fix compiler warnings

> ul_callback.c: In function 'send_partial_publish':
> ul_callback.c:258:5: warning: 'body' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   if (body) {
>      ^

---

Modified: src/modules/ims_registrar_pcscf/ul_callback.c

---

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

---

diff --git a/src/modules/ims_registrar_pcscf/ul_callback.c b/src/modules/ims_registrar_pcscf/ul_callback.c
index 0691bf2..57b89da 100644
--- a/src/modules/ims_registrar_pcscf/ul_callback.c
+++ b/src/modules/ims_registrar_pcscf/ul_callback.c
@@ -193,6 +193,7 @@ int send_partial_publish(ppublic_t *impu, struct pcontact *c, int type)
 	str p_asserted_identity_header;
 	str publ_id;
 	reginfo_event_t *new_event;
+	str *body = NULL;
 	
 	content_type.s = "application/reginfo+xml";
 	content_type.len = 23;
@@ -216,7 +217,7 @@ int send_partial_publish(ppublic_t *impu, struct pcontact *c, int type)
 	LM_DBG("p_asserted_identity_header: [%.*s]", p_asserted_identity_header.len, p_asserted_identity_header.s);
 	
 	LM_DBG("Sending publish\n");
-	str *body = build_reginfo_partial(impu, c, type);
+	body = build_reginfo_partial(impu, c, type);
 
 	if (body == NULL || body->s == NULL) {
 		LM_ERR("Error on creating XML-Body for publish\n");




More information about the sr-dev mailing list