diff src/protocols/gg/lib/dcc.c @ 12218:9cbc5967fbfd

[gaim-migrate @ 14520] Crush some warnings. I ran this by Bartosz Oler and made some corrections at his suggestion. I'll be submitting this upstream and merging any changes they suggest/make-when-accepting. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Fri, 25 Nov 2005 00:32:45 +0000
parents 3c536224f0d0
children fc464a0abccc
line wrap: on
line diff
--- a/src/protocols/gg/lib/dcc.c	Thu Nov 24 21:07:12 2005 +0000
+++ b/src/protocols/gg/lib/dcc.c	Fri Nov 25 00:32:45 2005 +0000
@@ -1,4 +1,4 @@
-/* $Id: dcc.c 13801 2005-09-14 19:10:39Z datallah $ */
+/* $Id: dcc.c 14520 2005-11-25 00:32:45Z rlaager $ */
 
 /*
  *  (C) Copyright 2001-2002 Wojtek Kaniewski <wojtekka@irc.pl>
@@ -83,7 +83,7 @@
  */
 int gg_dcc_request(struct gg_session *sess, uin_t uin)
 {
-	return gg_send_message_ctcp(sess, GG_CLASS_CTCP, uin, "\002", 1);
+	return gg_send_message_ctcp(sess, GG_CLASS_CTCP, uin, (const unsigned char *)"\002", 1);
 }
 
 /* 
@@ -227,7 +227,7 @@
 	}
 	
 	gg_debug(GG_DEBUG_MISC, "// gg_dcc_fill_file_info2() short name \"%s\", dos name \"%s\"\n", name, d->file_info.short_filename);
-	strncpy(d->file_info.filename, name, sizeof(d->file_info.filename) - 1);
+	strncpy((char *)d->file_info.filename, name, sizeof(d->file_info.filename) - 1);
 
 	return 0;
 }
@@ -568,7 +568,9 @@
 	if (h->type == GG_SESSION_DCC_SOCKET) {
 		struct sockaddr_in sin;
 		struct gg_dcc *c;
-		int fd, sin_len = sizeof(sin), one = 1;
+		int fd;
+		socklen_t sin_len = sizeof(sin);
+		int one = 1;
 		
 		if ((fd = accept(h->fd, (struct sockaddr*) &sin, &sin_len)) == -1) {
 			gg_debug(GG_DEBUG_MISC, "// gg_dcc_watch_fd() can't accept() new connection (errno=%d, %s)\n", errno, strerror(errno));
@@ -614,7 +616,8 @@
 		struct gg_dcc_tiny_packet tiny;
 		struct gg_dcc_small_packet small;
 		struct gg_dcc_big_packet big;
-		int size, tmp, res, res_size = sizeof(res);
+		int size, tmp, res;
+		socklen_t res_size = sizeof(res);
 		unsigned int utmp;
 		char buf[1024], ack[] = "UDAG";