Another round of cleanups like the previous ones.

Cheers
Kjartan

Index: test/benchmark-posix-small-files.c
===================================================================
--- test/benchmark-posix-small-files.c	(revisjon 1030)
+++ test/benchmark-posix-small-files.c	(arbeidskopi)
@@ -62,10 +62,8 @@
 create_file (const gchar *base_dir)
 {
   gchar         *scratch_file;
-  gchar         *scratch_name;
   gint           output_fd;
   gint           pid;
-  GError        *error = NULL;
   gchar          buffer [BUFFER_SIZE];
   gint           i;
 
@@ -110,7 +108,6 @@
 read_file (const gchar *scratch_file)
 {
   gint          input_fd;
-  GError       *error = NULL;
   gint          i;
 
   input_fd = open (scratch_file, O_RDONLY);
@@ -146,8 +143,6 @@
 static void
 delete_file (const gchar *scratch_file)
 {
-  GError *error = NULL;
-
   if (unlink (scratch_file) < 0)
     {
       g_printerr ("Failed to delete scratch file: %s\n", strerror (errno));
Index: test/benchmark-gvfs-small-files.c
===================================================================
--- test/benchmark-gvfs-small-files.c	(revisjon 1030)
+++ test/benchmark-gvfs-small-files.c	(arbeidskopi)
@@ -134,9 +134,9 @@
 static void
 delete_file (GFile *scratch_file)
 {
+#if 0
   GError *error = NULL;
 
-#if 0
   /* Enable when GDaemonFile supports delete */
 
   if (!g_file_delete (scratch_file, NULL, &error))
Index: test/benchmark-gvfs-big-files.c
===================================================================
--- test/benchmark-gvfs-big-files.c	(revisjon 1030)
+++ test/benchmark-gvfs-big-files.c	(arbeidskopi)
@@ -134,9 +134,9 @@
 static void
 delete_file (GFile *scratch_file)
 {
+#if 0
   GError *error = NULL;
 
-#if 0
   /* Enable when GDaemonFile supports delete */
 
   if (!g_file_delete (scratch_file, NULL, &error))
Index: common/gdbusutils.c
===================================================================
--- common/gdbusutils.c	(revisjon 1030)
+++ common/gdbusutils.c	(arbeidskopi)
@@ -1070,7 +1070,7 @@
 static const GSourceFuncs dbus_source_funcs = {
   dbus_source_prepare,
   dbus_source_check,
-  dbus_source_dispatch,
+  dbus_source_dispatch
 };
 
 /* Called when the connection dies or when we're unintegrating from mainloop */
Index: common/gmountsource.c
===================================================================
--- common/gmountsource.c	(revisjon 1030)
+++ common/gmountsource.c	(arbeidskopi)
@@ -189,7 +189,7 @@
 {
   DBusMessage *message;
   guint32 flags_as_int;
-  AskPasswordData data = {0};
+  AskPasswordData data = {NULL};
 
   if (password_out)
     *password_out = NULL;
Index: daemon/gvfsjob.c
===================================================================
--- daemon/gvfsjob.c	(revisjon 1030)
+++ daemon/gvfsjob.c	(arbeidskopi)
@@ -40,7 +40,7 @@
 #define P_(_x) (_x)
 
 enum {
-  PROP_0,
+  PROP_0
 };
 
 enum {
Index: daemon/pty_open.c
===================================================================
--- daemon/pty_open.c	(revisjon 1030)
+++ daemon/pty_open.c	(arbeidskopi)
@@ -40,7 +40,7 @@
 
 /* Originally from vte */
 
-#include "../config.h"
+#include "config.h"
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
Index: daemon/gvfsjobopenforwrite.h
===================================================================
--- daemon/gvfsjobopenforwrite.h	(revisjon 1030)
+++ daemon/gvfsjobopenforwrite.h	(arbeidskopi)
@@ -42,7 +42,7 @@
 typedef enum {
   OPEN_FOR_WRITE_CREATE = 0,
   OPEN_FOR_WRITE_APPEND = 1,
-  OPEN_FOR_WRITE_REPLACE = 2,
+  OPEN_FOR_WRITE_REPLACE = 2
 } GVfsJobOpenForWriteMode;
 
 struct _GVfsJobOpenForWrite
Index: daemon/gvfsbackendftp.c
===================================================================
--- daemon/gvfsbackendftp.c	(revisjon 1030)
+++ daemon/gvfsbackendftp.c	(arbeidskopi)
@@ -84,8 +84,9 @@
 	  GMountSource *mount_source,
 	  gboolean is_automount)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
-
+#endif
   /* TODO */
 
   g_vfs_job_succeeded (G_VFS_JOB (job));
@@ -98,7 +99,9 @@
 	   GMountSource *mount_source,
 	   gboolean is_automount)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
+#endif
   const char *server, *share, *user, *domain;
 
   server = g_mount_spec_get (mount_spec, "server");
@@ -132,11 +135,11 @@
 		  GVfsJobOpenForRead *job,
 		  const char *filename)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
 
   /* TODO */
 
-#if 0
   if (file == NULL)
     g_vfs_job_failed_from_errno (G_VFS_JOB (job), errno);
   else
@@ -155,11 +158,11 @@
 	 char *buffer,
 	 gsize bytes_requested)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
 
   /* TODO */
 
-#if 0
   if (res == -1)
     g_vfs_job_failed_from_errno (G_VFS_JOB (job), errno);
   else
@@ -178,9 +181,9 @@
 		 goffset    offset,
 		 GSeekType  type)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
 
-#if 0
   switch (type)
     {
     case G_SEEK_SET:
@@ -218,11 +221,11 @@
 	       GVfsJobCloseRead *job,
 	       GVfsBackendHandle handle)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
 
   /* TODO */
 
-#if 0
   if (res == -1)
     g_vfs_job_failed_from_errno (G_VFS_JOB (job), errno);
 #endif
@@ -236,11 +239,11 @@
            const char *filename,
            GFileCreateFlags flags)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
 
   /* TODO */
 
-#if 0
   if (file == NULL)
     g_vfs_job_failed_from_errno (G_VFS_JOB (job), errno);
   else
@@ -261,11 +264,11 @@
               const char *filename,
               GFileCreateFlags flags)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
 
   /* TODO */
 
-#if 0
   if (file == NULL)
     g_vfs_job_failed_from_errno (G_VFS_JOB (job), errno);
   else
@@ -296,8 +299,9 @@
             gboolean make_backup,
             GFileCreateFlags flags)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
-
+#endif
   /* TODO */
 }
 
@@ -308,11 +312,11 @@
 	  char *buffer,
 	  gsize buffer_size)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
 
   /* TODO */
 
-#if 0
   if (res == -1)
     g_vfs_job_failed_from_errno (G_VFS_JOB (job), errno);
   else
@@ -330,8 +334,9 @@
 		  goffset    offset,
 		  GSeekType  type)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
-
+#endif
   /* TODO */
 }
 
@@ -340,8 +345,9 @@
 		GVfsJobCloseWrite *job,
 		GVfsBackendHandle _handle)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
-
+#endif
   /* TODO */
 }
 
@@ -353,8 +359,9 @@
                GFileInfo *info,
                GFileAttributeMatcher *attribute_matcher)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
-
+#endif
   /* TODO */
 }
 
@@ -385,8 +392,9 @@
               GFileAttributeMatcher *attribute_matcher,
               GFileQueryInfoFlags flags)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
-
+#endif
   /* TODO */
 }
 
@@ -396,8 +404,9 @@
                      const char *filename,
                      const char *display_name)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
-
+#endif
   /* TODO */
 }
 
@@ -406,8 +415,9 @@
 	   GVfsJobDelete *job,
 	   const char *filename)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
-
+#endif
   /* TODO */
 }
 
@@ -416,8 +426,9 @@
 		   GVfsJobMakeDirectory *job,
 		   const char *filename)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
-
+#endif
   /* TODO */
 }
 
@@ -430,8 +441,9 @@
 	 GFileProgressCallback progress_callback,
 	 gpointer progress_callback_data)
 {
+#if 0
   GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
-
+#endif
   /* TODO */
 }
 
Index: daemon/gvfsjobdbus.c
===================================================================
--- daemon/gvfsjobdbus.c	(revisjon 1030)
+++ daemon/gvfsjobdbus.c	(arbeidskopi)
@@ -41,7 +41,7 @@
 enum {
   PROP_0,
   PROP_MESSAGE,
-  PROP_CONNECTION,
+  PROP_CONNECTION
 };
 
 static void send_reply                  (GVfsJob      *job);
Index: daemon/gvfsdaemon.c
===================================================================
--- daemon/gvfsdaemon.c	(revisjon 1030)
+++ daemon/gvfsdaemon.c	(arbeidskopi)
@@ -43,7 +43,7 @@
 #include <gdbusutils.h>
 
 enum {
-  PROP_0,
+  PROP_0
 };
 
 typedef struct {
Index: daemon/mount.c
===================================================================
--- daemon/mount.c	(revisjon 1030)
+++ daemon/mount.c	(arbeidskopi)
@@ -952,7 +952,7 @@
 
 struct DBusObjectPathVTable tracker_dbus_vtable = {
   NULL,
-  dbus_message_function,
+  dbus_message_function
 };
 
 
Index: daemon/gvfsbackendtrash.c
===================================================================
--- daemon/gvfsbackendtrash.c	(revisjon 1030)
+++ daemon/gvfsbackendtrash.c	(arbeidskopi)
@@ -329,7 +329,7 @@
 typedef enum {
   HAS_SYSTEM_DIR = 1<<0,
   HAS_USER_DIR = 1<<1,
-  HAS_TRASH_FILES = 1<<1,
+  HAS_TRASH_FILES = 1<<1
 } TopdirInfo;
 
 static TopdirInfo
Index: client/smburi.c
===================================================================
--- client/smburi.c	(revisjon 1030)
+++ client/smburi.c	(arbeidskopi)
@@ -85,7 +85,7 @@
 
   uri = g_vfs_decode_uri (uri_str);
   if (uri == NULL)
-    return FALSE;
+    return NULL;
   
   if (uri->host == NULL || strlen (uri->host) == 0)
     {
Index: client/gdaemonfileinputstream.c
===================================================================
--- client/gdaemonfileinputstream.c	(revisjon 1030)
+++ client/gdaemonfileinputstream.c	(arbeidskopi)
@@ -69,14 +69,14 @@
 
 typedef enum {
   INPUT_STATE_IN_REPLY_HEADER,
-  INPUT_STATE_IN_BLOCK,
+  INPUT_STATE_IN_BLOCK
 } InputState;
 
 typedef enum {
   STATE_OP_DONE,
   STATE_OP_READ,
   STATE_OP_WRITE,
-  STATE_OP_SKIP,
+  STATE_OP_SKIP
 } StateOp;
 
 typedef enum {
@@ -86,7 +86,7 @@
   READ_STATE_HANDLE_INPUT_BLOCK,
   READ_STATE_SKIP_BLOCK,
   READ_STATE_HANDLE_HEADER,
-  READ_STATE_READ_BLOCK,
+  READ_STATE_READ_BLOCK
 } ReadState;
 
 typedef struct {
@@ -110,7 +110,7 @@
   SEEK_STATE_HANDLE_INPUT,
   SEEK_STATE_HANDLE_INPUT_BLOCK,
   SEEK_STATE_SKIP_BLOCK,
-  SEEK_STATE_HANDLE_HEADER,
+  SEEK_STATE_HANDLE_HEADER
 } SeekState;
 
 typedef struct {
@@ -136,7 +136,7 @@
   CLOSE_STATE_HANDLE_INPUT,
   CLOSE_STATE_HANDLE_INPUT_BLOCK,
   CLOSE_STATE_SKIP_BLOCK,
-  CLOSE_STATE_HANDLE_HEADER,
+  CLOSE_STATE_HANDLE_HEADER
 } CloseState;
 
 typedef struct {
@@ -1215,7 +1215,7 @@
   
   if (!run_sync_state_machine (file, (state_machine_iterator)iterate_seek_state_machine,
 			       &op, cancellable, error))
-    return -1; /* IO Error */
+    return FALSE; /* IO Error */
 
   if (!op.ret_val)
     g_propagate_error (error, op.ret_error);
Index: client/gdaemonfileoutputstream.c
===================================================================
--- client/gdaemonfileoutputstream.c	(revisjon 1030)
+++ client/gdaemonfileoutputstream.c	(arbeidskopi)
@@ -49,14 +49,14 @@
   STATE_OP_DONE,
   STATE_OP_READ,
   STATE_OP_WRITE,
-  STATE_OP_SKIP,
+  STATE_OP_SKIP
 } StateOp;
 
 typedef enum {
   WRITE_STATE_INIT = 0,
   WRITE_STATE_WROTE_COMMAND,
   WRITE_STATE_SEND_DATA,
-  WRITE_STATE_HANDLE_INPUT,
+  WRITE_STATE_HANDLE_INPUT
 } WriteState;
 
 typedef struct {
@@ -79,7 +79,7 @@
 typedef enum {
   SEEK_STATE_INIT = 0,
   SEEK_STATE_WROTE_REQUEST,
-  SEEK_STATE_HANDLE_INPUT,
+  SEEK_STATE_HANDLE_INPUT
 } SeekState;
 
 typedef struct {
@@ -101,7 +101,7 @@
 typedef enum {
   CLOSE_STATE_INIT = 0,
   CLOSE_STATE_WROTE_REQUEST,
-  CLOSE_STATE_HANDLE_INPUT,
+  CLOSE_STATE_HANDLE_INPUT
 } CloseState;
 
 typedef struct {
@@ -951,7 +951,7 @@
   
   if (!run_sync_state_machine (file, (state_machine_iterator)iterate_seek_state_machine,
 			       &op, cancellable, error))
-    return -1; /* IO Error */
+    return FALSE; /* IO Error */
 
   if (!op.ret_val)
     g_propagate_error (error, op.ret_error);
Index: client/gdaemonfile.c
===================================================================
--- client/gdaemonfile.c	(revisjon 1030)
+++ client/gdaemonfile.c	(arbeidskopi)
@@ -492,7 +492,7 @@
       /* For copy this will cause the fallback code to be involved */
       g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
 		   _("Operation not supported, files on different mounts"));
-      return FALSE;
+      return NULL;
     }
   
   message =
_______________________________________________
gnome-vfs-list mailing list
gnome-vfs-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list

Reply via email to