Re: GCC4 and building gnome-vfs



fre, 08,.04.2005 kl. 11.30 +0200, skrev Alexander Larsson:
> On Thu, 2005-04-07 at 12:03 +0200, Kjartan Maraas wrote:
> > tor, 31,.03.2005 kl. 10.26 +0200, skrev Alexander Larsson:
> > > On Tue, 2005-03-29 at 14:44 +0200, Kjartan Maraas wrote:
> > > > Hi.
> > > > 
> > > > I'm running into problems building gnome-vfs with the new GCC in Fedora
> > > > Core 4 test releases. I've cooked up a patch to "fix" some of them, but
> > > > I need more help with the stuff in gnome-vfs-handle.c
> > > > 
> > > > Attaching a patch for the stuff I have now.
> > > >

And here's an updated one including all the stuff that came up after
getting past the below problem.

Cheers
Kjartan

? gnome-vfs-cleanups.patch
? warnings
? libgnomevfs/gnome-vfs2-2.10.0-2.src.rpm
? programs/gnomevfs-mv
Index: libgnomevfs/gnome-vfs-daemon-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-daemon-method.c,v
retrieving revision 1.4
diff -u -p -r1.4 gnome-vfs-daemon-method.c
--- libgnomevfs/gnome-vfs-daemon-method.c	15 Dec 2003 10:28:09 -0000	1.4
+++ libgnomevfs/gnome-vfs-daemon-method.c	8 Apr 2005 13:07:02 -0000
@@ -360,7 +360,7 @@ do_write (GnomeVFSMethod *method,
 	
 	CORBA_exception_init (&ev);
 	buf._maximum = buf._length = num_bytes;
-	buf._buffer = (char *)buffer;
+	buf._buffer = (unsigned char *)buffer;
 	buf._release = 0;
 	
 	res = GNOME_VFS_DaemonHandle_Write ((GNOME_VFS_DaemonHandle) method_handle,
@@ -417,7 +417,7 @@ do_seek (GnomeVFSMethod *method,
 static GnomeVFSResult
 do_tell (GnomeVFSMethod *method,
 	 GnomeVFSMethodHandle *method_handle,
-	 GnomeVFSFileOffset *offset_return)
+	 GnomeVFSFileSize *offset_return)
 {
 	GnomeVFSResult res;
 	CORBA_Environment ev;
Index: libgnomevfs/gnome-vfs-dns-sd.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-dns-sd.c,v
retrieving revision 1.10
diff -u -p -r1.10 gnome-vfs-dns-sd.c
--- libgnomevfs/gnome-vfs-dns-sd.c	10 Jan 2005 17:57:12 -0000	1.10
+++ libgnomevfs/gnome-vfs-dns-sd.c	8 Apr 2005 13:07:02 -0000
@@ -101,14 +101,14 @@ gnome_vfs_dns_sd_service_status_get_type
 }
 
 static GHashTable *
-decode_txt_record (unsigned char *raw_txt,
+decode_txt_record (char *raw_txt,
 		   int raw_txt_len)
 {
 	GHashTable *hash;
 	int i;
 	int len;
-	unsigned char *key, *value, *end;
-	unsigned char *key_dup, *value_dup;
+	char *key, *value, *end;
+	char *key_dup, *value_dup;
 
 	if (raw_txt == NULL)
 		return NULL;
@@ -174,10 +174,10 @@ decode_32 (unsigned char *p)
 }
 
 static void
-split_service_instance (unsigned char *name,
-			unsigned char *service,
-			unsigned char *type,
-			unsigned char *domain)
+split_service_instance (char *name,
+			char *service,
+			char *type,
+			char *domain)
 {
 	int i, n_dots;
 
@@ -237,7 +237,7 @@ is_valid_dns_sd_type (const char *type)
 }
 
 static int
-parse_header (char *reply, int reply_len,
+parse_header (unsigned char *reply, int reply_len,
 	      unsigned char *p,
 	      dns_message_header *header)
 {
@@ -256,7 +256,7 @@ parse_header (char *reply, int reply_len
 
 
 static int
-parse_qs (char *reply, int reply_len,
+parse_qs (unsigned char *reply, int reply_len,
 	  unsigned char *p,
 	  char *name, int name_size,
 	  int *qtype, int *qclass)
@@ -285,7 +285,7 @@ parse_qs (char *reply, int reply_len,
 }
 
 static int
-parse_rr (char *reply, int reply_len,
+parse_rr (unsigned char *reply, int reply_len,
 	  unsigned char *p,
 	  dns_message_rr *rr)
 {
@@ -510,10 +510,10 @@ unicast_browse_sync (const char *domain,
 			
 			split_service_instance (name, ptr_service, ptr_type, ptr_domain);
 
-			if (is_valid_dns_sd_type (ptr_type)) {
-				service.name = g_strdup (ptr_service);
-				service.type = g_strdup (ptr_type);
-				service.domain = g_strdup (ptr_domain);
+			if (is_valid_dns_sd_type ((char *)ptr_type)) {
+				service.name = g_strdup ((char *)ptr_service);
+				service.type = g_strdup ((char *)ptr_type);
+				service.domain = g_strdup ((char *)ptr_domain);
 
 				g_array_append_val(array, service);
 			}
Index: libgnomevfs/gnome-vfs-method.h
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-method.h,v
retrieving revision 1.14
diff -u -p -r1.14 gnome-vfs-method.h
--- libgnomevfs/gnome-vfs-method.h	12 Jan 2005 18:08:46 -0000	1.14
+++ libgnomevfs/gnome-vfs-method.h	8 Apr 2005 13:07:02 -0000
@@ -99,7 +99,7 @@ typedef GnomeVFSResult (* GnomeVFSMethod
 typedef GnomeVFSResult (* GnomeVFSMethodTellFunc)
 					(GnomeVFSMethod *method,
 					 GnomeVFSMethodHandle *method_handle,
-					 GnomeVFSFileOffset *offset_return);
+					 GnomeVFSFileSize *offset_return);
 
 typedef GnomeVFSResult (* GnomeVFSMethodOpenDirectoryFunc)
 					(GnomeVFSMethod *method,
Index: libgnomevfs/gnome-vfs-mime-info.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-mime-info.c,v
retrieving revision 1.84
diff -u -p -r1.84 gnome-vfs-mime-info.c
--- libgnomevfs/gnome-vfs-mime-info.c	9 Dec 2004 17:16:33 -0000	1.84
+++ libgnomevfs/gnome-vfs-mime-info.c	8 Apr 2005 13:07:02 -0000
@@ -309,7 +309,7 @@ handle_simple_string (xmlTextReaderPtr r
 			if (text != NULL) {
 				g_free (text);
 			}
-			text = g_strdup (xmlTextReaderConstValue (reader));
+			text = g_strdup ((char *)xmlTextReaderConstValue (reader));
 		}
 
 		ret = read_next (reader);
@@ -324,9 +324,9 @@ handle_attribute (xmlTextReaderPtr  read
 	xmlChar *xml_text = NULL;
 	char *text = NULL;
 
-	xml_text = xmlTextReaderGetAttribute (reader, attribute);
+	xml_text = xmlTextReaderGetAttribute (reader, (guchar *)attribute);
 	if (xml_text != NULL) {
-		text = g_strdup (xml_text);
+		text = g_strdup ((char *)xml_text);
 		xmlFree (xml_text);
 	}
 	return text;
@@ -351,13 +351,13 @@ handle_mime_info (const char *filename, 
 		
 		if (type == XML_READER_TYPE_ELEMENT) {
 			const char *name;
-			name = xmlTextReaderConstName (reader);
+			name = (char *)xmlTextReaderConstName (reader);
 			
 			if (!strcmp (name, "comment")) {
 				const char *lang;
 				int lang_level;
 				
-				lang = xmlTextReaderConstXmlLang (reader);
+				lang = (char *)xmlTextReaderConstXmlLang (reader);
 				
 				lang_level = language_level (lang);
 				
Index: libgnomevfs/gnome-vfs-mime-magic.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-mime-magic.c,v
retrieving revision 1.48
diff -u -p -r1.48 gnome-vfs-mime-magic.c
--- libgnomevfs/gnome-vfs-mime-magic.c	7 Jan 2004 18:44:02 -0000	1.48
+++ libgnomevfs/gnome-vfs-mime-magic.c	8 Apr 2005 13:07:02 -0000
@@ -65,7 +65,7 @@ _gnome_vfs_sniff_buffer_looks_like_text 
 		return FALSE;
 	}
 	
-	if (g_utf8_validate (sniff_buffer->buffer, 
+	if (g_utf8_validate ((gchar *)sniff_buffer->buffer, 
 			     sniff_buffer->buffer_length, (const gchar**)&end))
 	{
 		return TRUE;
@@ -76,7 +76,7 @@ _gnome_vfs_sniff_buffer_looks_like_text 
      		 */
 		gint remaining_bytes = sniff_buffer->buffer_length;
 
-		remaining_bytes -= (end-((gchar*)sniff_buffer->buffer));
+		remaining_bytes -= (end-((gchar *)sniff_buffer->buffer));
 	
  		if (g_utf8_get_char_validated(end, remaining_bytes) == -2)
 			return TRUE;
@@ -84,7 +84,7 @@ _gnome_vfs_sniff_buffer_looks_like_text 
 		else {
 			size_t wlen;
 			wchar_t wc;
-			gchar *src, *end;
+			guchar *src, *end;
 			mbstate_t state;
 
 			src = sniff_buffer->buffer;
@@ -96,7 +96,7 @@ _gnome_vfs_sniff_buffer_looks_like_text 
 				if (*src == 0)
 					return FALSE;
 				
-				wlen = mbrtowc(&wc, src, end - src, &state);
+				wlen = mbrtowc(&wc, (gchar *)src, end - src, &state);
 
 				if (wlen == (size_t)(-1)) {
 					/* Illegal mb sequence */
Index: libgnomevfs/gnome-vfs-open-fd.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-open-fd.c,v
retrieving revision 1.3
diff -u -p -r1.3 gnome-vfs-open-fd.c
--- libgnomevfs/gnome-vfs-open-fd.c	19 Dec 2002 17:57:19 -0000	1.3
+++ libgnomevfs/gnome-vfs-open-fd.c	8 Apr 2005 13:07:02 -0000
@@ -213,7 +213,7 @@ do_seek (GnomeVFSMethod *method,
 static GnomeVFSResult
 do_tell (GnomeVFSMethod *method,
 	 GnomeVFSMethodHandle *method_handle,
-	 GnomeVFSFileOffset *offset_return)
+	 GnomeVFSFileSize *offset_return)
 {
 	FileHandle *file_handle;
 	off_t offset;
Index: libgnomevfs/gnome-vfs-utils.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-utils.c,v
retrieving revision 1.93
diff -u -p -r1.93 gnome-vfs-utils.c
--- libgnomevfs/gnome-vfs-utils.c	23 Feb 2005 09:15:42 -0000	1.93
+++ libgnomevfs/gnome-vfs-utils.c	8 Apr 2005 13:07:02 -0000
@@ -429,7 +429,7 @@ hex_to_int (gchar c)
 }
 
 static int
-unescape_character (const char *scanner)
+unescape_character (const gchar *scanner)
 {
 	int first_digit;
 	int second_digit;
@@ -600,9 +600,9 @@ gnome_vfs_remove_optional_escapes (char 
 	
 	length = strlen (uri);
 
-	for (scanner = uri; *scanner != '\0'; scanner++, length--) {
+	for (scanner = (guchar *)uri; *scanner != '\0'; scanner++, length--) {
 		if (*scanner == HEX_ESCAPE) {
-			character = unescape_character (scanner + 1);
+			character = unescape_character ((char *)scanner + 1);
 			if (character < 0) {
 				/* invalid hexadecimal character */
 				return GNOME_VFS_ERROR_INVALID_URI;
@@ -1336,14 +1336,14 @@ gnome_vfs_escape_high_chars (const gucha
 	}
 	
 	if (escape_count == 0) {
-		return g_strdup (string);
+		return g_strdup ((char *)string);
 	}
 
 	/* allocate two extra characters for every character that
 	 * needs escaping and space for a trailing zero
 	 */
 	result = g_malloc (scanner - string + escape_count * 2 + 1);
-	for (scanner = string, result_scanner = result; *scanner != '\0'; scanner++) {
+	for (scanner = string, result_scanner = (guchar *)result; *scanner != '\0'; scanner++) {
 		if (!ACCEPTABLE(*scanner)) {
 			*result_scanner++ = '%';
 			*result_scanner++ = hex[*scanner >> 4];
@@ -1449,13 +1449,13 @@ gnome_vfs_make_uri_from_input_internal (
                 /* don't insert break here, read above comment */
 	default:
 		if (has_valid_scheme (stripped)) {
-			uri = gnome_vfs_escape_high_chars (stripped);
+			uri = gnome_vfs_escape_high_chars ((guchar *)stripped);
 		} else if (looks_like_http_uri (stripped)) {
-			escaped = gnome_vfs_escape_high_chars (stripped);
+			escaped = gnome_vfs_escape_high_chars ((guchar *)stripped);
 			uri = g_strconcat ("http://";, escaped, NULL);
 			g_free (escaped);
 		} else {
-			escaped = gnome_vfs_escape_high_chars (stripped);
+			escaped = gnome_vfs_escape_high_chars ((guchar *)stripped);
 			uri = g_strconcat ("file://", escaped, NULL);
 			g_free (escaped);
 		}
Index: libgnomevfs/xdgmimealias.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/xdgmimealias.c,v
retrieving revision 1.2
diff -u -p -r1.2 xdgmimealias.c
--- libgnomevfs/xdgmimealias.c	9 Dec 2004 15:43:48 -0000	1.2
+++ libgnomevfs/xdgmimealias.c	8 Apr 2005 13:07:02 -0000
@@ -105,7 +105,7 @@ _xdg_mime_alias_list_lookup (XdgAliasLis
   if (list->n_aliases > 0)
     {
       key.alias = (char *)alias;
-      key.mime_type = 0;
+      key.mime_type = NULL;
 
       entry = bsearch (&key, list->aliases, list->n_aliases,
 		       sizeof (XdgAlias), alias_entry_cmp);
Index: libgnomevfs/xdgmimeint.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/xdgmimeint.c,v
retrieving revision 1.6
diff -u -p -r1.6 xdgmimeint.c
--- libgnomevfs/xdgmimeint.c	9 Dec 2004 15:43:48 -0000	1.6
+++ libgnomevfs/xdgmimeint.c	8 Apr 2005 13:07:02 -0000
@@ -52,7 +52,7 @@ static const unsigned char _xdg_utf8_ski
   3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,1,1
 };
 
-const char * const _xdg_utf8_skip = _xdg_utf8_skip_data;
+const unsigned char * const _xdg_utf8_skip = _xdg_utf8_skip_data;
 
 
 
Index: libgnomevfs/xdgmimeint.h
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/xdgmimeint.h,v
retrieving revision 1.7
diff -u -p -r1.7 xdgmimeint.h
--- libgnomevfs/xdgmimeint.h	10 Jan 2005 13:52:23 -0000	1.7
+++ libgnomevfs/xdgmimeint.h	8 Apr 2005 13:07:02 -0000
@@ -61,7 +61,7 @@ typedef unsigned int   xdg_uint32_t;
 					      (((xdg_uint32_t)(val) & 0x000000FFU) << 24))
 /* UTF-8 utils
  */
-extern const char *const _xdg_utf8_skip;
+extern const unsigned char *const _xdg_utf8_skip;
 #define _xdg_utf8_next_char(p) (char *)((p) + _xdg_utf8_skip[*(unsigned char *)(p)])
 #define _xdg_utf8_char_size(p) (int) (_xdg_utf8_skip[*(unsigned char *)(p)])
 
Index: libgnomevfs/xdgmimemagic.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/xdgmimemagic.c,v
retrieving revision 1.9
diff -u -p -r1.9 xdgmimemagic.c
--- libgnomevfs/xdgmimemagic.c	9 Dec 2004 15:43:48 -0000	1.9
+++ libgnomevfs/xdgmimemagic.c	8 Apr 2005 13:07:02 -0000
@@ -156,11 +156,11 @@ _xdg_mime_magic_match_free (XdgMimeMagic
 /* Reads in a hunk of data until a newline character or a '\000' is hit.  The
  * returned string is null terminated, and doesn't include the newline.
  */
-static unsigned char *
+static char *
 _xdg_mime_magic_read_to_newline (FILE *magic_file,
 				 int  *end_of_file)
 {
-  unsigned char *retval;
+  char *retval;
   int c;
   int len, pos;
 
Index: modules/bzip2-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/bzip2-method.c,v
retrieving revision 1.32
diff -u -p -r1.32 bzip2-method.c
--- modules/bzip2-method.c	22 Jan 2004 12:29:10 -0000	1.32
+++ modules/bzip2-method.c	8 Apr 2005 13:07:02 -0000
@@ -173,7 +173,7 @@ bzip2_method_handle_init_for_decompress 
 	g_free (handle->buffer);
 
 	handle->buffer = g_malloc (BZ_BUFSIZE);
-	handle->bzstream.next_in = handle->buffer;
+	handle->bzstream.next_in = (char *)handle->buffer;
 	handle->bzstream.avail_in = 0;
 
 	/* FIXME bugzilla.eazel.com 1177: Make small, and possibly verbosity, configurable! */
@@ -201,7 +201,7 @@ bzip2_method_handle_init_for_compress (B
 	g_free (handle->buffer);
 
 	handle->buffer = g_malloc (BZ_BUFSIZE);
-	handle->bzstream.next_out = handle->buffer;
+	handle->bzstream.next_out = (char *)handle->buffer;
 	handle->bzstream.avail_out = BZ_BUFSIZE;
 
 	/* FIXME bugzilla.eazel.com 1174: We want this to be user configurable.  */
@@ -269,7 +269,7 @@ flush_write (Bzip2MethodHandle *bzip2_ha
 					  len, &bytes_written);
 		RETURN_IF_FAIL (result);
 
-		bzstream->next_out = bzip2_handle->buffer;
+		bzstream->next_out = (char *)bzip2_handle->buffer;
 		bzstream->avail_out = BZ_BUFSIZE;
 
 		if (done)
@@ -406,7 +406,7 @@ fill_buffer (Bzip2MethodHandle *bzip2_ha
 			return result;
 		bzip2_handle->last_vfs_result = result;
 	} else {
-		bzstream->next_in = bzip2_handle->buffer;
+		bzstream->next_in = (char *)bzip2_handle->buffer;
 		bzstream->avail_in = count;
 	}
 
@@ -496,7 +496,7 @@ do_write (GnomeVFSMethod *method,
 		if (bzstream->avail_out == 0) {
 			GnomeVFSFileSize written;
 
-			bzstream->next_out = bzip2_handle->buffer;
+			bzstream->next_out = (char *)bzip2_handle->buffer;
 			result = gnome_vfs_write (bzip2_handle->parent_handle,
 						  bzip2_handle->buffer,
 						  BZ_BUFSIZE, &written);
Index: modules/computer-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/computer-method.c,v
retrieving revision 1.8
diff -u -p -r1.8 computer-method.c
--- modules/computer-method.c	12 Aug 2004 09:08:56 -0000	1.8
+++ modules/computer-method.c	8 Apr 2005 13:07:02 -0000
@@ -755,7 +755,7 @@ do_seek (GnomeVFSMethod *method,
 static GnomeVFSResult
 do_tell (GnomeVFSMethod *method,
 	 GnomeVFSMethodHandle *method_handle,
-	 GnomeVFSFileOffset *offset_return)
+	 GnomeVFSFileSize *offset_return)
 {
 	FileHandle *file_handle;
 
Index: modules/dns-sd-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/dns-sd-method.c,v
retrieving revision 1.3
diff -u -p -r1.3 dns-sd-method.c
--- modules/dns-sd-method.c	31 Jan 2005 19:47:50 -0000	1.3
+++ modules/dns-sd-method.c	8 Apr 2005 13:07:02 -0000
@@ -631,7 +631,7 @@ do_seek (GnomeVFSMethod *method,
 static GnomeVFSResult
 do_tell (GnomeVFSMethod *method,
 	 GnomeVFSMethodHandle *method_handle,
-	 GnomeVFSFileOffset *offset_return)
+	 GnomeVFSFileSize *offset_return)
 {
 	FileHandle *file_handle;
 
Index: modules/file-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/file-method.c,v
retrieving revision 1.134
diff -u -p -r1.134 file-method.c
--- modules/file-method.c	12 Jan 2005 18:08:46 -0000	1.134
+++ modules/file-method.c	8 Apr 2005 13:07:02 -0000
@@ -441,7 +441,7 @@ do_seek (GnomeVFSMethod *method,
 static GnomeVFSResult
 do_tell (GnomeVFSMethod *method,
 	 GnomeVFSMethodHandle *method_handle,
-	 GnomeVFSFileOffset *offset_return)
+	 GnomeVFSFileSize *offset_return)
 {
 	FileHandle *file_handle;
 	OFF_T offset;
Index: modules/ftp-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/ftp-method.c,v
retrieving revision 1.114
diff -u -p -r1.114 ftp-method.c
--- modules/ftp-method.c	14 Feb 2005 15:47:47 -0000	1.114
+++ modules/ftp-method.c	8 Apr 2005 13:07:02 -0000
@@ -437,7 +437,7 @@ get_response (FtpConnection *conn, Gnome
 			conf_state = (line[0] == '6' && line[1] == '3' &&  line[2] == '1');
 			
 			/* BASE64-decode the response */
-			decoded_response = radix_decode (line + 4, &decoded_response_len);
+			decoded_response = radix_decode ((guchar *)line + 4, &decoded_response_len);
 			g_free (line);
 			if (decoded_response == NULL) {
 				return GNOME_VFS_ERROR_GENERIC;
@@ -1023,7 +1023,7 @@ ftp_kerberos_login (FtpConnection *conn,
 				return GNOME_VFS_ERROR_LOGIN_FAILED;
 			}
 			
-			decoded_token = radix_decode (conn->response_message + 5,
+			decoded_token = radix_decode ((guchar *)conn->response_message + 5,
 						      &len);
 			if (decoded_token == NULL) {
 				gss_release_name (&min_stat, &target_name);
@@ -1920,7 +1920,7 @@ do_seek (GnomeVFSMethod *method,
 static GnomeVFSResult
 do_tell (GnomeVFSMethod *method,
 	 GnomeVFSMethodHandle *method_handle,
-	 GnomeVFSFileOffset *offset_return)
+	 GnomeVFSFileSize *offset_return)
 {
 	FtpConnection *conn = (FtpConnection * )method_handle;
 
Index: modules/http-neon-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/http-neon-method.c,v
retrieving revision 1.23.2.1
diff -u -p -r1.23.2.1 http-neon-method.c
--- modules/http-neon-method.c	14 Mar 2005 22:38:54 -0000	1.23.2.1
+++ modules/http-neon-method.c	8 Apr 2005 13:07:02 -0000
@@ -2489,7 +2489,7 @@ do_close (GnomeVFSMethod 	*method,
 		   
 		DEBUG_HTTP ("[PUT] Filesize: %d", len);
 		
-		ne_set_request_body_buffer (req, data, len);
+		ne_set_request_body_buffer (req, (char *)data, len);
 		res = ne_request_dispatch (req);
 
 		result = resolve_result (res, req);
@@ -2703,7 +2703,7 @@ do_seek (GnomeVFSMethod	      *method,
 static GnomeVFSResult
 do_tell (GnomeVFSMethod       *method,
 	 GnomeVFSMethodHandle *method_handle,
-	 GnomeVFSFileOffset   *offset_return)
+	 GnomeVFSFileSize   *offset_return)
 {
 	HttpFileHandle *handle;
 	
Index: modules/http-proxy.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/http-proxy.c,v
retrieving revision 1.6
diff -u -p -r1.6 http-proxy.c
--- modules/http-proxy.c	17 Feb 2005 20:21:43 -0000	1.6
+++ modules/http-proxy.c	8 Apr 2005 13:07:02 -0000
@@ -314,7 +314,7 @@ static void parse_ignore_host(gpointer d
 {
     gchar *hostname, *input, *netmask;
     gboolean ip_addr = FALSE, has_error = FALSE;
-    struct in_addr host, mask;
+    struct in_addr host, mask = { 0, };
 #ifdef ENABLE_IPV6
     struct in6_addr host6, mask6;
     gint i;
Index: modules/network-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/network-method.c,v
retrieving revision 1.6
diff -u -p -r1.6 network-method.c
--- modules/network-method.c	7 Oct 2004 15:08:38 -0000	1.6
+++ modules/network-method.c	8 Apr 2005 13:07:02 -0000
@@ -672,7 +672,7 @@ do_seek (GnomeVFSMethod *method,
 static GnomeVFSResult
 do_tell (GnomeVFSMethod *method,
 	 GnomeVFSMethodHandle *method_handle,
-	 GnomeVFSFileOffset *offset_return)
+	 GnomeVFSFileSize *offset_return)
 {
 	FileHandle *file_handle;
 
Index: modules/sftp-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/sftp-method.c,v
retrieving revision 1.31
diff -u -p -r1.31 sftp-method.c
--- modules/sftp-method.c	11 Feb 2005 22:18:08 -0000	1.31
+++ modules/sftp-method.c	8 Apr 2005 13:07:02 -0000
@@ -163,9 +163,9 @@ static gboolean sftp_connection_process_
 
 typedef struct
 {
-	guchar  *base;
-	guchar  *read_ptr;
-	guchar  *write_ptr;
+	gchar  *base;
+	gchar  *read_ptr;
+	gchar  *write_ptr;
 	gint     alloc;
 } Buffer;
 
@@ -701,7 +701,7 @@ iobuf_read_handle (int fd, gchar **handl
 		g_critical ("Expected SSH2_FXP_HANDLE(%u) packet, got %u",
 			    SSH2_FXP_HANDLE, type);
 
-	*handle = buffer_read_block (&msg, len);
+	*handle = buffer_read_block (&msg, (gint32 *)len);
 
 	buffer_free (&msg);
 
@@ -1061,7 +1061,7 @@ sftp_connect (SftpConnection **connectio
 	guint           last_arg, i;
 	gboolean        full_auth;
 	gboolean        done_auth;
-	gboolean	save_password;
+	gboolean	save_password = FALSE;
 	Buffer          msg;
 	gchar           type;
 	char *password = NULL;
@@ -1787,7 +1787,7 @@ do_open (GnomeVFSMethod        *method,
 	buffer_send (&msg, conn->out_fd);
 	buffer_free (&msg);
 	
-	sftp_res = iobuf_read_handle (conn->in_fd, &sftp_handle, id, &sftp_handle_len);
+	sftp_res = iobuf_read_handle (conn->in_fd, &sftp_handle, id, (guint32 *)&sftp_handle_len);
 
 	if (sftp_res == SSH2_FX_OK) {
 		handle = g_new0 (SftpOpenHandle, 1);
@@ -2281,7 +2281,7 @@ do_seek (GnomeVFSMethod       *method,
 static GnomeVFSResult
 do_tell (GnomeVFSMethod       *method,
 	 GnomeVFSMethodHandle *method_handle,
-	 GnomeVFSFileOffset   *offset_return)
+	 GnomeVFSFileSize   *offset_return)
 {
 	SftpOpenHandle *handle;
 
Index: modules/smb-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/smb-method.c,v
retrieving revision 1.25
diff -u -p -r1.25 smb-method.c
--- modules/smb-method.c	2 Mar 2005 23:44:11 -0000	1.25
+++ modules/smb-method.c	8 Apr 2005 13:07:02 -0000
@@ -1446,7 +1446,7 @@ do_read (GnomeVFSMethod *method,
 	 GnomeVFSContext *context)
 {
 	FileHandle *handle = (FileHandle *)method_handle;
-	GnomeVFSResult res = GNOME_VFS_OK;;
+	GnomeVFSResult res = GNOME_VFS_OK;
 	SmbAuthContext actx;
 	ssize_t n = 0;
 
@@ -2119,7 +2119,7 @@ do_seek (GnomeVFSMethod *method,
 static GnomeVFSResult
 do_tell (GnomeVFSMethod *method,
 		GnomeVFSMethodHandle *method_handle,
-		GnomeVFSFileOffset *offset_return)
+		GnomeVFSFileSize *offset_return)
 {
 	FileHandle *handle = (FileHandle *)method_handle;
 	SmbAuthContext actx;
Index: modules/tar-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/tar-method.c,v
retrieving revision 1.2
diff -u -p -r1.2 tar-method.c
--- modules/tar-method.c	20 Jul 2004 21:07:51 -0000	1.2
+++ modules/tar-method.c	8 Apr 2005 13:07:02 -0000
@@ -449,7 +449,7 @@ do_seek (GnomeVFSMethod *method,
 static GnomeVFSResult
 do_tell (GnomeVFSMethod *method,
 	 GnomeVFSMethodHandle *method_handle,
-	 GnomeVFSFileOffset *offset_return)
+	 GnomeVFSFileSize *offset_return)
 {
 	FileHandle *handle = (FileHandle*) method_handle;
 	*offset_return = handle->current_offset;
Index: modules/test-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/test-method.c,v
retrieving revision 1.17
diff -u -p -r1.17 test-method.c
--- modules/test-method.c	22 Jan 2004 12:29:10 -0000	1.17
+++ modules/test-method.c	8 Apr 2005 13:07:02 -0000
@@ -65,7 +65,7 @@ typedef struct {
 
 static gboolean properly_initialized;
 
-static char *test_method_name;
+static guchar *test_method_name;
 static GList *settings_list;
 
 static const char * const
@@ -129,7 +129,7 @@ translate_uri (GnomeVFSURI *uri)
 	no_method = strchr (uri_text, ':');
 	
 	if (test_method_name != NULL) {
-	  translated_uri_text = g_strconcat (test_method_name, 
+	  translated_uri_text = g_strconcat ((char *)test_method_name, 
 					     no_method, NULL);
 	} else {
 	  translated_uri_text = NULL;
@@ -279,15 +279,15 @@ load_settings (const char *filename) 
 	if (doc == NULL
 	    || doc->xmlRootNode == NULL
 	    || doc->xmlRootNode->name == NULL
-	    || g_ascii_strcasecmp (doc->xmlRootNode->name, "testmodule") != 0) {
+	    || g_ascii_strcasecmp ((char *)doc->xmlRootNode->name, "testmodule") != 0) {
 		xmlFreeDoc(doc);
 		return FALSE;
 	}
 
-	test_method_name = xmlGetProp (doc->xmlRootNode, "method");
+	test_method_name = xmlGetProp (doc->xmlRootNode, (guchar *)"method");
 	
 	for (node = doc->xmlRootNode->xmlChildrenNode; node != NULL; node = node->next) {
-		name = xmlGetProp (node, "name");
+		name = (char *)xmlGetProp (node, (guchar *)"name");
 		if (name == NULL) {
 			continue;
 		}
@@ -295,19 +295,19 @@ load_settings (const char *filename) 
 		operation = g_new0 (OperationSettings, 1);
 		operation->operation_name = name;
 
-		str = xmlGetProp (node, "delay");
+		str = (char *)xmlGetProp (node, (guchar *)"delay");
 		if (str != NULL) {
 			sscanf (str, "%d", &operation->delay);
 		}
 		xmlFree (str);
 
-		str = xmlGetProp(node, "execute_operation");
+		str = (char *)xmlGetProp(node, (guchar *)"execute_operation");
 		if (str != NULL && g_ascii_strcasecmp (str, "FALSE") == 0) {
 			operation->skip = TRUE;
 		}
 		xmlFree (str);
 
-		str = xmlGetProp (node, "result");
+		str = (char *)xmlGetProp (node, (guchar *)"result");
 		if (str != NULL) {
 			operation->override_result = parse_result_text
 				(str, &operation->overridden_result_value);
@@ -385,7 +385,7 @@ do_seek (GnomeVFSMethod *method,
 static GnomeVFSResult
 do_tell (GnomeVFSMethod *method,
 	 GnomeVFSMethodHandle *method_handle,
-	 GnomeVFSFileOffset *offset_return)
+	 GnomeVFSFileSize *offset_return)
 {
 	PERFORM_OPERATION_NO_URI (tell, gnome_vfs_tell ((GnomeVFSHandle *) method_handle, offset_return));
 }
Index: modules/translate-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/translate-method.c,v
retrieving revision 1.31
diff -u -p -r1.31 translate-method.c
--- modules/translate-method.c	17 Jan 2002 18:00:36 -0000	1.31
+++ modules/translate-method.c	8 Apr 2005 13:07:03 -0000
@@ -605,7 +605,7 @@ tr_do_seek(GnomeVFSMethod * method,
 static GnomeVFSResult
 tr_do_tell(GnomeVFSMethod * method,
 	   GnomeVFSMethodHandle * method_handle,
-	   GnomeVFSFileOffset * offset_return)
+	   GnomeVFSFileSize * offset_return)
 {
 	TranslateMethod *tm = (TranslateMethod *) method;
 	return tm->real_method->tell(tm->real_method, method_handle,
Index: monikers/bonobo-stream-vfs.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/monikers/bonobo-stream-vfs.c,v
retrieving revision 1.19
diff -u -p -r1.19 bonobo-stream-vfs.c
--- monikers/bonobo-stream-vfs.c	25 Aug 2004 14:22:46 -0000	1.19
+++ monikers/bonobo-stream-vfs.c	8 Apr 2005 13:07:03 -0000
@@ -169,7 +169,7 @@ vfs_seek (PortableServer_Servant stream,
 		bonobo_object (stream));
 	GnomeVFSSeekPosition pos;
 	GnomeVFSResult       result;
-	GnomeVFSFileOffset   where;
+	GnomeVFSFileSize   where;
 	
 	switch (whence) {
 	case Bonobo_Stream_SeekCur:
Index: programs/gnomevfs-ls.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/programs/gnomevfs-ls.c,v
retrieving revision 1.5
diff -u -p -r1.5 gnomevfs-ls.c
--- programs/gnomevfs-ls.c	16 Jul 2004 12:48:26 -0000	1.5
+++ programs/gnomevfs-ls.c	8 Apr 2005 13:07:03 -0000
@@ -23,7 +23,7 @@
 #include <locale.h>
 #include <libgnomevfs/gnome-vfs.h>
 
-char *directory;
+static char *directory;
 
 static void show_data (gpointer item, gpointer no_item);
 static void list (void);
Index: test/test-async-cancel.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/test/test-async-cancel.c,v
retrieving revision 1.23
diff -u -p -r1.23 test-async-cancel.c
--- test/test-async-cancel.c	24 Jul 2002 08:06:37 -0000	1.23
+++ test/test-async-cancel.c	8 Apr 2005 13:07:03 -0000
@@ -308,7 +308,7 @@ file_close_callback (GnomeVFSAsyncHandle
 }
 
 static gboolean file_read_flag;
-char read_buffer[1];
+static char read_buffer[1];
 
 static void
 file_read_callback (GnomeVFSAsyncHandle *handle,
Index: test/test-async-directory.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/test/test-async-directory.c,v
retrieving revision 1.25
diff -u -p -r1.25 test-async-directory.c
--- test/test-async-directory.c	18 Sep 2003 14:29:01 -0000	1.25
+++ test/test-async-directory.c	8 Apr 2005 13:07:03 -0000
@@ -154,7 +154,7 @@ test_read_file_read_callback (GnomeVFSAs
 	test_read_file_succeeded (handle);
 }
 
-char buffer[256];
+static char buffer[256];
 
 /* Start reading a chunk. */
 static void
@@ -202,7 +202,7 @@ typedef struct {
 	int num_entries_read;
 } CallbackData;
 
-volatile int async_task_counter; 
+static volatile int async_task_counter; 
 
 static void
 directory_load_callback (GnomeVFSAsyncHandle *handle,
Index: test/test-directory.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/test/test-directory.c,v
retrieving revision 1.23
diff -u -p -r1.23 test-directory.c
--- test/test-directory.c	2 May 2002 21:07:28 -0000	1.23
+++ test/test-directory.c	8 Apr 2005 13:07:03 -0000
@@ -33,7 +33,7 @@
 
 static int measure_speed = 0;
 
-struct poptOption options[] = {
+static struct poptOption options[] = {
 	{
 		"measure-speed",
 		'm',
Index: test/test-shell.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/test/test-shell.c,v
retrieving revision 1.33
diff -u -p -r1.33 test-shell.c
--- test/test-shell.c	9 Dec 2003 08:09:53 -0000	1.33
+++ test/test-shell.c	8 Apr 2005 13:07:03 -0000
@@ -56,7 +56,7 @@ static char *cur_dir = NULL;
 
 static GHashTable *files = NULL;
 
-FILE *vfserr = NULL;
+static FILE *vfserr = NULL;
 
 
 static gboolean
@@ -930,10 +930,10 @@ do_handleinfo (void)
  * ---------------------------------------------------------------------
  */
 
-GMainLoop *main_loop = NULL;
+static GMainLoop *main_loop = NULL;
 
-int interactive = 0;
-const struct poptOption options [] = {
+static int interactive = 0;
+static const struct poptOption options [] = {
 	{ "interactive", 'i', POPT_ARG_NONE, &interactive, 0,
 	  "Allow interactive input", NULL  },
 	{ NULL, '\0', 0, NULL, 0 }
Index: test/test-symlinks.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/test/test-symlinks.c,v
retrieving revision 1.10
diff -u -p -r1.10 test-symlinks.c
--- test/test-symlinks.c	25 Aug 2004 17:22:18 -0000	1.10
+++ test/test-symlinks.c	8 Apr 2005 13:07:03 -0000
@@ -42,7 +42,7 @@ static int measure_speed = 0;
 static int sort = 0;
 static int items_per_notification = 1;
 
-struct poptOption options[] = {
+static struct poptOption options[] = {
 	{
 		"chunk-size",
 		'c',
Index: test/test-uri.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/test/test-uri.c,v
retrieving revision 1.43
diff -u -p -r1.43 test-uri.c
--- test/test-uri.c	11 Feb 2005 13:29:24 -0000	1.43
+++ test/test-uri.c	8 Apr 2005 13:07:03 -0000
@@ -92,7 +92,7 @@ test_make_canonical_path (const char *in
 	g_free (output);
 }
 
-const char* test_uris[][2] = 
+static const char* test_uris[][2] = 
 {
 	{ "http://www.gnome.org/";, "index.html" },
 	{ "http://www.gnome.org/";, "/index.html"},
Index: test/test-xfer.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/test/test-xfer.c,v
retrieving revision 1.10
diff -u -p -r1.10 test-xfer.c
--- test/test-xfer.c	29 Oct 2002 10:37:23 -0000	1.10
+++ test/test-xfer.c	8 Apr 2005 13:07:03 -0000
@@ -35,7 +35,7 @@ static int remove_source = 0;
 static int follow_symlinks = 0;
 static int follow_symlinks_recursive = 0;
 
-const struct poptOption options[] = {
+static const struct poptOption options[] = {
 	POPT_AUTOHELP
 	{
 		"recursive",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]