Module: kamailio
Branch: master
Commit: c7c8d31e4a4f9640673099aa1589e3fe96fad558
URL:
https://github.com/kamailio/kamailio/commit/c7c8d31e4a4f9640673099aa1589e3f…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2016-05-13T10:28:23+02:00
dmq_usrloc: fix compiler warning #612
CC (gcc) [M dmq_usrloc.so] usrloc_sync.o
usrloc_sync.c: In function 'usrloc_dmq_handle_msg':
usrloc_sync.c:403:12: warning: 'reg_id' may be used uninitialized in this
function [-Wmaybe-uninitialized]
ci.reg_id = reg_id;
^
usrloc_sync.c:401:13: warning: 'methods' may be used uninitialized in this
function [-Wmaybe-uninitialized]
ci.methods = methods;
^
usrloc_sync.c:405:19: warning: 'last_modified' may be used uninitialized in this
function [-Wmaybe-uninitialized]
ci.last_modified = last_modified;
^
usrloc_sync.c:394:7: warning: 'q' may be used uninitialized in this function
[-Wmaybe-uninitialized]
ci.q = q;
^
usrloc_sync.c:399:12: warning: 'cflags' may be used uninitialized in this
function [-Wmaybe-uninitialized]
ci.cflags = cflags;
^
usrloc_sync.c:397:11: warning: 'flags' may be used uninitialized in this function
[-Wmaybe-uninitialized]
ci.flags = flags;
^
usrloc_sync.c:396:10: warning: 'cseq' may be used uninitialized in this function
[-Wmaybe-uninitialized]
ci.cseq = cseq;
^
usrloc_sync.c:393:13: warning: 'expires' may be used uninitialized in this
function [-Wmaybe-uninitialized]
ci.expires = expires;
^
usrloc_sync.c:407:2: warning: 'action' may be used uninitialized in this function
[-Wmaybe-uninitialized]
switch(action) {
^
make[3]: 'libsrutils.so.1.0' is up to date.
---
Modified: modules/dmq_usrloc/usrloc_sync.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c7c8d31e4a4f9640673099aa1589e3f…
Patch:
https://github.com/kamailio/kamailio/commit/c7c8d31e4a4f9640673099aa1589e3f…
---
diff --git a/modules/dmq_usrloc/usrloc_sync.c b/modules/dmq_usrloc/usrloc_sync.c
index f89500d..86e34ac 100644
--- a/modules/dmq_usrloc/usrloc_sync.c
+++ b/modules/dmq_usrloc/usrloc_sync.c
@@ -301,6 +301,8 @@ int usrloc_dmq_handle_msg(struct sip_msg* msg, peer_reponse_t* resp,
dmq_node_t*
int action, expires, cseq, flags, cflags, q, last_modified, methods, reg_id;
str aor, ruid, c, received, path, callid, user_agent, instance;
+ action = expires = cseq = flags = cflags = q = last_modified = methods = reg_id = 0;
+
parse_from_header(msg);
body = ((struct to_body*)msg->from->parsed)->uri;