more possible cleanups for gio-standalone

Kjartan Maraas <[email protected]>
Newsgroups gmane.comp.gnome.vfs.general
Message-ID <[email protected]>
Patch attached.

Cheers
Kjartan

_______________________________________________
gnome-vfs-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list
gio-cleanups.patch (text/x-patch, 2.4 KB)
Index: gio/glocalfileinfo.c
===================================================================
--- gio/glocalfileinfo.c	(revisjon 741)
+++ gio/glocalfileinfo.c	(arbeidskopi)
@@ -72,10 +72,10 @@
 } UidData;
 
 G_LOCK_DEFINE_STATIC (uid_cache);
-GHashTable *uid_cache = NULL;
+static GHashTable *uid_cache = NULL;
 
 G_LOCK_DEFINE_STATIC (gid_cache);
-GHashTable *gid_cache = NULL;
+static GHashTable *gid_cache = NULL;
 
 static void thumb_md5 (const char *string, unsigned char digest[16]);
 
Index: gio/gvfs.c
===================================================================
--- gio/gvfs.c	(revisjon 741)
+++ gio/gvfs.c	(arbeidskopi)
@@ -193,9 +193,8 @@
   GType *vfs_impls;
   int i;
   guint n_vfs_impls;
-  char *use_this;
+  const char *use_this;
   GVfs *vfs;
-  int max_prio;
   GType (*casted_get_type)(void);
 
   use_this = g_getenv ("GIO_USE_VFS");
@@ -211,7 +210,7 @@
   vfs_impls = g_type_children (G_TYPE_VFS, &n_vfs_impls);
 
   g_qsort_with_data (vfs_impls, n_vfs_impls, sizeof (GType),
-		     compare_vfs_type, use_this);
+		     compare_vfs_type, (gpointer)use_this);
   
   for (i = 0; i < n_vfs_impls; i++)
     {
Index: gio/inotify/inotify-kernel.c
===================================================================
--- gio/inotify/inotify-kernel.c	(revisjon 741)
+++ gio/inotify/inotify-kernel.c	(arbeidskopi)
@@ -185,7 +185,7 @@
   return TRUE;
 }
 
-GSourceFuncs ik_source_funcs =
+static GSourceFuncs ik_source_funcs =
 {
   ik_source_prepare,
   ik_source_check,
Index: gio/inotify/inotify-diag.c
===================================================================
--- gio/inotify/inotify-diag.c	(revisjon 741)
+++ gio/inotify/inotify-diag.c	(arbeidskopi)
@@ -39,10 +39,11 @@
 id_dump (gpointer userdata)
 {
   GIOChannel *ioc;
+  pid_t pid;
+  char *fname;
   G_LOCK (inotify_lock);
   ioc = NULL;
-  pid_t pid = getpid ();
-  char *fname;
+  pid = getpid ();
 
   fname = g_strdup_printf ("/tmp/gvfsid.%d", pid);
   ioc = g_io_channel_new_file (fname, "w", NULL);
Index: gio/fam/fam-helper.c
===================================================================
--- gio/fam/fam-helper.c	(revisjon 741)
+++ gio/fam/fam-helper.c	(arbeidskopi)
@@ -182,10 +182,12 @@
 	      gboolean directory,
 	      gpointer user_data)
 {
+  fam_sub *sub;
+
   if (!_fam_sub_startup ())
     return NULL;
   
-  fam_sub* sub = g_new0 (fam_sub, 1);
+  sub = g_new0 (fam_sub, 1);
   sub->pathname = g_strdup (pathname);
   sub->directory = directory;
   sub->user_data = user_data;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.