[sr-dev] git:master: xmlrpc: fix warning:=?UTF-8?Q?=20=C3=A2c?=. lenâay be used unini =?UTF-8?Q?tialized=20in=20this=20func?==?UTF-8?Q?tion=20?=[ -Wmaybe-uninitialized]

Ovidiu Sas osas at voipembedded.com
Tue Sep 17 00:25:10 CEST 2013


Module: sip-router
Branch: master
Commit: af7c3a816529cde599af9a62bfd174b2de3a2fb6
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=af7c3a816529cde599af9a62bfd174b2de3a2fb6

Author: Ovidiu Sas <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date:   Sun Sep 15 18:10:06 2013 -0400

xmlrpc: fix warning: âc.lenâay be used uninitialized in this function [-Wmaybe-uninitialized]

---

 modules/xmlrpc/xmlrpc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/xmlrpc/xmlrpc.c b/modules/xmlrpc/xmlrpc.c
index b840131..4fa9b15 100644
--- a/modules/xmlrpc/xmlrpc.c
+++ b/modules/xmlrpc/xmlrpc.c
@@ -1995,7 +1995,7 @@ error:
  */
 static int open_doc(rpc_ctx_t* ctx, sip_msg_t* msg)
 {
-	str doc;
+	str doc = {NULL,0};
 	xmlNodePtr root;
 	xmlNodePtr cur;
 	struct xmlrpc_reply* reply;
@@ -2396,7 +2396,7 @@ static int xmlrpc_reply(sip_msg_t* msg, char* p1, char* p2)
 static int select_method(str* res, struct select* s, sip_msg_t* msg)
 {
 	static char buf[1024];
-	str doc;
+	str doc = {NULL,0};
 	xmlDocPtr xmldoc;
 	xmlNodePtr cur;
 	char* method;




More information about the sr-dev mailing list