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

Author: Victor Seva <linuxman...@torreviejawireless.org>
Committer: Victor Seva <linuxman...@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");


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to