[Asterisk-cvs] asterisk srv.c,1.15,1.16 utils.c,1.63,1.64

russell russell
Sun Aug 7 02:43:32 CDT 2005


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv18843

Modified Files:
	srv.c utils.c 
Log Message:
more fixes for gcc4 warnings ...


Index: srv.c
===================================================================
RCS file: /usr/cvsroot/asterisk/srv.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- srv.c	10 Jul 2005 22:56:21 -0000	1.15
+++ srv.c	7 Aug 2005 06:47:20 -0000	1.16
@@ -44,7 +44,7 @@
 	unsigned short portnum;
 } __attribute__ ((__packed__));
 
-static int parse_srv(unsigned char *host, int hostlen, int *portno, unsigned char *answer, int len, unsigned char *msg)
+static int parse_srv(char *host, int hostlen, int *portno, char *answer, int len, char *msg)
 {
 	int res = 0;
 	struct srv *srv = (struct srv *)answer;
@@ -57,7 +57,7 @@
 	answer += sizeof(struct srv);
 	len -= sizeof(struct srv);
 
-	if ((res = dn_expand(msg,answer + len,answer, repl, sizeof(repl) - 1)) < 0) {
+	if ((res = dn_expand((unsigned char *)msg, (unsigned char *)answer + len, (unsigned char *)answer, repl, sizeof(repl) - 1)) < 0) {
 		ast_log(LOG_WARNING, "Failed to expand hostname\n");
 		return -1;
 	}
@@ -70,9 +70,9 @@
 		}
 		if (portno)
 			*portno = ntohs(srv->portnum);
-		return(0);
+		return 0;
 	}
-	return(-1);
+	return -1;
 }
 
 struct srv_context {
@@ -81,7 +81,7 @@
 	int *port;
 };
 
-static int srv_callback(void *context, u_char *answer, int len, u_char *fullanswer)
+static int srv_callback(void *context, char *answer, int len, char *fullanswer)
 {
 	struct srv_context *c = (struct srv_context *)context;
 

Index: utils.c
===================================================================
RCS file: /usr/cvsroot/asterisk/utils.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- utils.c	3 Aug 2005 17:36:46 -0000	1.63
+++ utils.c	7 Aug 2005 06:47:20 -0000	1.64
@@ -260,7 +260,7 @@
 	int x;
 
 	MD5Init(&md5);
-	MD5Update(&md5, input, strlen(input));
+	MD5Update(&md5, (unsigned char *)input, strlen(input));
 	MD5Final(digest, &md5);
 	ptr = output;
 	for (x=0; x<16; x++)




More information about the svn-commits mailing list