changeset 1047:a130b6a13abb

Fix some compilation warnings
author Sebastien Decugis <sdecugis@freediameter.net>
date Tue, 23 Apr 2013 15:59:26 +0800
parents 506e272ddbba
children 09e2a6d796ef
files extensions/rt_busypeers/rtbusy.c tests/testmesg.c
diffstat 2 files changed, 8 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/extensions/rt_busypeers/rtbusy.c	Tue Apr 23 15:59:15 2013 +0800
+++ b/extensions/rt_busypeers/rtbusy.c	Tue Apr 23 15:59:26 2013 +0800
@@ -69,7 +69,7 @@
 	/* Store the error in this routing data, this avoids sending the message to the same peer again */
 	CHECK_FCT( fd_rtd_error_add(rtd, 
 				    sentto, senttolen, 
-				    oh ? (DiamId_t)oh->os.data : fd_g_config->cnf_diamid, oh ? oh->os.len : fd_g_config->cnf_diamid_len , 
+				    (uint8_t *)(oh ? (DiamId_t)oh->os.data : fd_g_config->cnf_diamid), oh ? oh->os.len : fd_g_config->cnf_diamid_len , 
 	                            ER_DIAMETER_TOO_BUSY, 
 	                            &candidates, 
 	                            &sendingattemtps) );
@@ -249,7 +249,6 @@
 /* Unload */
 void fd_ext_fini(void)
 {
-	int i;
 	TRACE_ENTRY();
 	
 	/* Unregister the cb */
--- a/tests/testmesg.c	Tue Apr 23 15:59:15 2013 +0800
+++ b/tests/testmesg.c	Tue Apr 23 15:59:26 2013 +0800
@@ -937,29 +937,29 @@
 				CHECK( 0, fd_msg_hdr ( msg, &msgdata ) );
 				
 				/* Add a session id */
-				CHECK( 0, fd_msg_new_session( msg, "testmsg", strlen("testmsg") ) );
+				CHECK( 0, fd_msg_new_session( msg, (os0_t)"testmsg", strlen("testmsg") ) );
 				
 				/* Create two instances of Proxy-Info */
 				ADD_AVP( msg, MSG_BRW_LAST_CHILD, pi1, 0, "Proxy-Info");
 				ADD_AVP( msg, MSG_BRW_LAST_CHILD, pi2, 0, "Proxy-Info");
 
 				ADD_AVP( pi1, MSG_BRW_LAST_CHILD, avp, 0, "Proxy-State");
-				value.os.data = "ps_pi1";
-				value.os.len = strlen(value.os.data);
+				value.os.data = (os0_t)"ps_pi1";
+				value.os.len = strlen((char *)value.os.data);
 				CHECK( 0, fd_msg_avp_setvalue ( avp, &value ) );
 				
 				ADD_AVP( pi2, MSG_BRW_LAST_CHILD, avp, 0, "Proxy-State");
-				value.os.data = "pi2_state";
-				value.os.len = strlen(value.os.data);
+				value.os.data = (os0_t)"pi2_state";
+				value.os.len = strlen((char *)value.os.data);
 				CHECK( 0, fd_msg_avp_setvalue ( avp, &value ) );
 				
 				ADD_AVP( pi1, MSG_BRW_FIRST_CHILD, avp, 0, "Proxy-Host");
-				value.os.data = host1;
+				value.os.data = (os0_t)host1;
 				value.os.len = strlen(host1);
 				CHECK( 0, fd_msg_avp_setvalue ( avp, &value ) );
 				
 				ADD_AVP( pi2, MSG_BRW_LAST_CHILD, avp, 0, "Proxy-Host");
-				value.os.data = host2;
+				value.os.data = (os0_t)host2;
 				value.os.len = strlen(host2);
 				CHECK( 0, fd_msg_avp_setvalue ( avp, &value ) );
 				
@@ -983,7 +983,6 @@
 				/* Check there are two Proxy-Info with the two hosts */
 				{
 					int got_h1 = 0, got_h2=0;
-					struct dict_object * ph_model;
 					CHECK( 0, fd_msg_browse ( msg, MSG_BRW_FIRST_CHILD, &avp, NULL) );
 					while(avp) {
 						struct avp_hdr * avpdata = NULL;
"Welcome to our mercurial repository"