patch with gvfs cleanups
- From: Kjartan Maraas <kmaraas broadpark no>
- To: Nautilus List <nautilus-list gnome org>
- Subject: patch with gvfs cleanups
- Date: Fri, 15 Feb 2008 18:00:35 +0100
Here's a patch with a bunch of cleanups for gvfs
Cheers
Kjartan
Index: test/benchmark-common.c
===================================================================
--- test/benchmark-common.c (revisjon 1275)
+++ test/benchmark-common.c (arbeidskopi)
@@ -68,62 +68,6 @@
gboolean benchmark_is_running = FALSE;
static void
-benchmark_begin_data_plot (const gchar *name, const gchar *x_unit, const gchar *y_unit)
-{
- BenchmarkDataPlot *data_plot;
-
- data_plot = g_new0 (BenchmarkDataPlot, 1);
-
- data_plot->name = g_strdup (name);
- data_plot->x_unit = g_strdup (x_unit);
- data_plot->y_unit = g_strdup (y_unit);
-
- data_plot->data_sets = NULL;
-
- benchmark_data_plots = g_list_prepend (benchmark_data_plots, data_plot);
-}
-
-static void
-benchmark_begin_data_set (void)
-{
- BenchmarkDataPlot *data_plot;
- BenchmarkDataSet *data_set;
-
- if (!benchmark_data_plots)
- g_error ("Must begin a data plot before adding data sets!");
-
- data_plot = benchmark_data_plots->data;
-
- data_set = g_new0 (BenchmarkDataSet, 1);
- data_set->points = g_array_new (FALSE, FALSE, sizeof (BenchmarkDataPoint));
-
- data_plot->data_sets = g_list_prepend (data_plot->data_sets, data_set);
-}
-
-static void
-benchmark_add_data_point (gdouble x, gdouble y)
-{
- BenchmarkDataPlot *data_plot;
- BenchmarkDataSet *data_set;
- BenchmarkDataPoint data_point;
-
- if (!benchmark_data_plots)
- g_error ("Must begin a data plot before adding data sets!");
-
- data_plot = benchmark_data_plots->data;
-
- if (!data_plot->data_sets)
- g_error ("Must begin a data set before adding data points!");
-
- data_set = data_plot->data_sets->data;
-
- data_point.x = x;
- data_point.y = y;
-
- g_array_append_val (data_set->points, data_point);
-}
-
-static void
benchmark_end (void)
{
BenchmarkDataPlot *plot;
Index: test/benchmark-posix-big-files.c
===================================================================
--- test/benchmark-posix-big-files.c (revisjon 1275)
+++ test/benchmark-posix-big-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: common/gvfsdaemonprotocol.c
===================================================================
--- common/gvfsdaemonprotocol.c (revisjon 1275)
+++ common/gvfsdaemonprotocol.c (arbeidskopi)
@@ -226,7 +226,7 @@
break;
default:
dbus_type = NULL;
- g_warning ("Invalid attribute type %d, ignoring\n", type);
+ g_warning ("Invalid attribute type %u, ignoring\n", type);
break;
}
Index: common/gmounttracker.c
===================================================================
--- common/gmounttracker.c (revisjon 1275)
+++ common/gmounttracker.c (arbeidskopi)
@@ -54,7 +54,7 @@
DBusConnection *connection;
};
-G_DEFINE_TYPE (GMountTracker, g_mount_tracker, G_TYPE_OBJECT);
+G_DEFINE_TYPE (GMountTracker, g_mount_tracker, G_TYPE_OBJECT)
static DBusHandlerResult g_mount_tracker_filter_func (DBusConnection *conn,
DBusMessage *message,
Index: common/gdbusutils.c
===================================================================
--- common/gdbusutils.c (revisjon 1275)
+++ common/gdbusutils.c (arbeidskopi)
@@ -33,7 +33,6 @@
_g_dbus_oom (void)
{
g_error ("DBus failed with out of memory error");
- exit(1);
}
/* We use _ for escaping, so its not valid */
@@ -915,7 +914,7 @@
handler->dbus_source = dbus_source;
handler->watch = watch;
- handler->source = __g_fd_source_new (dbus_watch_get_fd (watch),
+ handler->source = __g_fd_source_new (dbus_watch_get_unix_fd (watch),
condition, NULL);
g_source_set_callback (handler->source,
(GSourceFunc) io_handler_dispatch, handler,
Index: common/gmountsource.c
===================================================================
--- common/gmountsource.c (revisjon 1275)
+++ common/gmountsource.c (arbeidskopi)
@@ -35,7 +35,7 @@
char *obj_path;
};
-G_DEFINE_TYPE (GMountSource, g_mount_source, G_TYPE_OBJECT);
+G_DEFINE_TYPE (GMountSource, g_mount_source, G_TYPE_OBJECT)
static void
g_mount_source_finalize (GObject *object)
@@ -310,11 +310,8 @@
GAsyncResult *res,
gpointer user_data)
{
- GMountSource *source;
AskPasswordSyncData *data;
- source = G_MOUNT_SOURCE (source_object);
-
data = (AskPasswordSyncData *) user_data;
data->result = g_object_ref (res);
Index: programs/gvfs-mount.c
===================================================================
--- programs/gvfs-mount.c (revisjon 1275)
+++ programs/gvfs-mount.c (arbeidskopi)
@@ -59,7 +59,6 @@
#ifdef HAVE_TERMIOS_H
struct termios term_attr;
int old_flags;
- int res;
gboolean restore_flags;
#endif
char data[256];
@@ -74,7 +73,7 @@
#ifdef HAVE_TERMIOS_H
restore_flags = FALSE;
- if (!echo && (res = tcgetattr (STDIN_FILENO, &term_attr)) == 0)
+ if (!echo && (tcgetattr (STDIN_FILENO, &term_attr)) == 0)
{
old_flags = term_attr.c_lflag;
term_attr.c_lflag &= ~ECHO;
Index: programs/gvfs-move.c
===================================================================
--- programs/gvfs-move.c (revisjon 1275)
+++ programs/gvfs-move.c (arbeidskopi)
@@ -63,7 +63,7 @@
goffset total_num_bytes,
gpointer user_data)
{
- g_print ("progress %"G_GUINT64_FORMAT"/%"G_GUINT64_FORMAT"\n",
+ g_print ("progress %"G_GINT64_FORMAT"/%"G_GINT64_FORMAT"\n",
current_num_bytes, total_num_bytes);
}
Index: programs/gvfs-copy.c
===================================================================
--- programs/gvfs-copy.c (revisjon 1275)
+++ programs/gvfs-copy.c (arbeidskopi)
@@ -67,7 +67,7 @@
goffset total_num_bytes,
gpointer user_data)
{
- g_print ("progress %"G_GUINT64_FORMAT"/%"G_GUINT64_FORMAT"\n",
+ g_print ("progress %"G_GINT64_FORMAT"/%"G_GINT64_FORMAT"\n",
current_num_bytes, total_num_bytes);
}
Index: gconf/gapplookupgconf.c
===================================================================
--- gconf/gapplookupgconf.c (revisjon 1275)
+++ gconf/gapplookupgconf.c (arbeidskopi)
@@ -56,10 +56,6 @@
static void
g_app_lookup_gconf_finalize (GObject *object)
{
- GAppLookupGConf *lookup;
-
- lookup = G_APP_LOOKUP_GCONF (object);
-
if (G_OBJECT_CLASS (g_app_lookup_gconf_parent_class)->finalize)
(*G_OBJECT_CLASS (g_app_lookup_gconf_parent_class)->finalize) (object);
}
@@ -70,7 +66,6 @@
GObjectConstructParam *construct_properties)
{
GObject *object;
- GAppLookupGConf *lookup;
GAppLookupGConfClass *klass;
GObjectClass *parent_class;
@@ -83,8 +78,6 @@
n_construct_properties,
construct_properties);
- lookup = G_APP_LOOKUP_GCONF (object);
-
return object;
}
@@ -154,10 +147,10 @@
if (enabled)
{
- if (g_str_has_suffix (command, "\"\%s\"") ||
- g_str_has_suffix (command, "\'\%s\'"))
+ if (g_str_has_suffix (command, "%s") ||
+ g_str_has_suffix (command, "%s"))
command[strlen (command) - 4] = 0;
- else if (g_str_has_suffix (command, "\%s"))
+ else if (g_str_has_suffix (command, "%s"))
command[strlen (command) - 2] = 0;
flags = G_APP_INFO_CREATE_SUPPORTS_URIS;
Index: daemon/gvfsjob.c
===================================================================
--- daemon/gvfsjob.c (revisjon 1275)
+++ daemon/gvfsjob.c (arbeidskopi)
@@ -34,7 +34,7 @@
#include "gvfsjob.h"
#include "gvfsjobsource.h"
-G_DEFINE_TYPE (GVfsJob, g_vfs_job, G_TYPE_OBJECT);
+G_DEFINE_TYPE (GVfsJob, g_vfs_job, G_TYPE_OBJECT)
/* TODO: Real P_() */
#define P_(_x) (_x)
Index: daemon/gvfsjobqueryinfo.c
===================================================================
--- daemon/gvfsjobqueryinfo.c (revisjon 1275)
+++ daemon/gvfsjobqueryinfo.c (arbeidskopi)
@@ -35,7 +35,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonprotocol.h"
-G_DEFINE_TYPE (GVfsJobQueryInfo, g_vfs_job_query_info, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobQueryInfo, g_vfs_job_query_info, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsjobupload.c
===================================================================
--- daemon/gvfsjobupload.c (revisjon 1275)
+++ daemon/gvfsjobupload.c (arbeidskopi)
@@ -35,7 +35,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonprotocol.h"
-G_DEFINE_TYPE (GVfsJobUpload, g_vfs_job_upload, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobUpload, g_vfs_job_upload, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsjobenumerate.c
===================================================================
--- daemon/gvfsjobenumerate.c (revisjon 1275)
+++ daemon/gvfsjobenumerate.c (arbeidskopi)
@@ -34,7 +34,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonprotocol.h"
-G_DEFINE_TYPE (GVfsJobEnumerate, g_vfs_job_enumerate, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobEnumerate, g_vfs_job_enumerate, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsbackenddav.c
===================================================================
--- daemon/gvfsbackenddav.c (revisjon 1275)
+++ daemon/gvfsbackenddav.c (arbeidskopi)
@@ -66,15 +66,11 @@
};
-G_DEFINE_TYPE (GVfsBackendDav, g_vfs_backend_dav, G_VFS_TYPE_BACKEND_HTTP);
+G_DEFINE_TYPE (GVfsBackendDav, g_vfs_backend_dav, G_VFS_TYPE_BACKEND_HTTP)
static void
g_vfs_backend_dav_finalize (GObject *object)
{
- GVfsBackendDav *backend;
-
- backend = G_VFS_BACKEND_DAV (object);
-
if (G_OBJECT_CLASS (g_vfs_backend_dav_parent_class)->finalize)
(*G_OBJECT_CLASS (g_vfs_backend_dav_parent_class)->finalize) (object);
}
@@ -238,7 +234,6 @@
default:
return NULL;
}
- return NULL;
}
static GFileInfo *
@@ -622,9 +617,9 @@
if (mount_base->path)
{
- SoupMessage *msg;
- msg = message_new_from_uri (SOUP_METHOD_OPTIONS, mount_base);
- soup_session_queue_message (session, msg,
+ SoupMessage *message;
+ message = message_new_from_uri (SOUP_METHOD_OPTIONS, mount_base);
+ soup_session_queue_message (session, message,
discover_mount_root_ready, job);
return;
}
@@ -682,7 +677,6 @@
GMountSource *mount_source,
gboolean is_automount)
{
- GVfsBackendDav *op_backend;
MountOpData *data;
SoupSession *session;
SoupMessage *msg;
@@ -695,8 +689,6 @@
g_print ("+ mount\n");
- op_backend = G_VFS_BACKEND_DAV (backend);
-
host = g_mount_spec_get (mount_spec, "host");
user = g_mount_spec_get (mount_spec, "user");
port = g_mount_spec_get (mount_spec, "port");
@@ -865,7 +857,6 @@
GVfsBackendDav *backend;
GVfsJobEnumerate *job;
SoupURI *base;
- GFileInfo *info;
GError *error;
xmlDocPtr doc;
xmlNodePtr root;
@@ -875,7 +866,6 @@
backend = G_VFS_BACKEND_DAV (job->backend);
base = G_VFS_BACKEND_HTTP (backend)->mount_base;
error = NULL;
- info = NULL;
doc = multistatus_parse_xml (msg, &root, &error);
@@ -1154,10 +1144,8 @@
char *buffer,
gsize buffer_size)
{
- GVfsBackendHttp *op_backend;
GOutputStream *stream;
- op_backend = G_VFS_BACKEND_HTTP (backend);
stream = G_OUTPUT_STREAM (handle);
g_output_stream_write_async (stream,
@@ -1206,10 +1194,8 @@
GVfsJobCloseWrite *job,
GVfsBackendHandle handle)
{
- GVfsBackendHttp *op_backend;
GOutputStream *stream;
- op_backend = G_VFS_BACKEND_HTTP (backend);
stream = G_OUTPUT_STREAM (handle);
g_output_stream_close_async (stream,
Index: daemon/gvfsjobwrite.c
===================================================================
--- daemon/gvfsjobwrite.c (revisjon 1275)
+++ daemon/gvfsjobwrite.c (arbeidskopi)
@@ -33,7 +33,7 @@
#include "gvfsjobwrite.h"
#include "gvfsdaemonutils.h"
-G_DEFINE_TYPE (GVfsJobWrite, g_vfs_job_write, G_VFS_TYPE_JOB);
+G_DEFINE_TYPE (GVfsJobWrite, g_vfs_job_write, G_VFS_TYPE_JOB)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsbackendtest.c
===================================================================
--- daemon/gvfsbackendtest.c (revisjon 1275)
+++ daemon/gvfsbackendtest.c (arbeidskopi)
@@ -40,15 +40,11 @@
#include "gvfsjobqueryinfo.h"
#include "gvfsjobenumerate.h"
-G_DEFINE_TYPE (GVfsBackendTest, g_vfs_backend_test, G_VFS_TYPE_BACKEND);
+G_DEFINE_TYPE (GVfsBackendTest, g_vfs_backend_test, G_VFS_TYPE_BACKEND)
static void
g_vfs_backend_test_finalize (GObject *object)
{
- GVfsBackendTest *backend;
-
- backend = G_VFS_BACKEND_TEST (object);
-
if (G_OBJECT_CLASS (g_vfs_backend_test_parent_class)->finalize)
(*G_OBJECT_CLASS (g_vfs_backend_test_parent_class)->finalize) (object);
}
@@ -196,7 +192,7 @@
{
guint tag;
- g_print ("read (%"G_GSSIZE_FORMAT")\n", bytes_requested);
+ g_print ("read (%"G_GSIZE_FORMAT")\n", bytes_requested);
tag = g_timeout_add (0, read_idle_cb, job);
G_VFS_JOB (job)->backend_data = GINT_TO_POINTER (tag);
@@ -216,7 +212,7 @@
int fd;
off_t final_offset;
- g_print ("seek_on_read (%d, %d)\n", (int)offset, type);
+ g_print ("seek_on_read (%d, %u)\n", (int)offset, type);
switch (type)
{
Index: daemon/gvfsmonitor.c
===================================================================
--- daemon/gvfsmonitor.c (revisjon 1275)
+++ daemon/gvfsmonitor.c (arbeidskopi)
@@ -28,7 +28,6 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
-#include <unistd.h>
#include <fcntl.h>
#include <glib.h>
Index: daemon/gvfsbackendsmb.c
===================================================================
--- daemon/gvfsbackendsmb.c (revisjon 1275)
+++ daemon/gvfsbackendsmb.c (arbeidskopi)
@@ -77,7 +77,7 @@
SMBCSRV *cached_server;
};
-G_DEFINE_TYPE (GVfsBackendSmb, g_vfs_backend_smb, G_VFS_TYPE_BACKEND);
+G_DEFINE_TYPE (GVfsBackendSmb, g_vfs_backend_smb, G_VFS_TYPE_BACKEND)
static void
g_vfs_backend_smb_finalize (GObject *object)
Index: daemon/gvfsjobcloseread.c
===================================================================
--- daemon/gvfsjobcloseread.c (revisjon 1275)
+++ daemon/gvfsjobcloseread.c (arbeidskopi)
@@ -33,7 +33,7 @@
#include "gvfsjobcloseread.h"
#include "gvfsdaemonutils.h"
-G_DEFINE_TYPE (GVfsJobCloseRead, g_vfs_job_close_read, G_VFS_TYPE_JOB);
+G_DEFINE_TYPE (GVfsJobCloseRead, g_vfs_job_close_read, G_VFS_TYPE_JOB)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsjobmakedirectory.c
===================================================================
--- daemon/gvfsjobmakedirectory.c (revisjon 1275)
+++ daemon/gvfsjobmakedirectory.c (arbeidskopi)
@@ -34,7 +34,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonprotocol.h"
-G_DEFINE_TYPE (GVfsJobMakeDirectory, g_vfs_job_make_directory, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobMakeDirectory, g_vfs_job_make_directory, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsjobunmount.c
===================================================================
--- daemon/gvfsjobunmount.c (revisjon 1275)
+++ daemon/gvfsjobunmount.c (arbeidskopi)
@@ -34,7 +34,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonprotocol.h"
-G_DEFINE_TYPE (GVfsJobUnmount, g_vfs_job_unmount, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobUnmount, g_vfs_job_unmount, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
@@ -46,10 +46,6 @@
static void
g_vfs_job_unmount_finalize (GObject *object)
{
- GVfsJobUnmount *job;
-
- job = G_VFS_JOB_UNMOUNT (object);
-
if (G_OBJECT_CLASS (g_vfs_job_unmount_parent_class)->finalize)
(*G_OBJECT_CLASS (g_vfs_job_unmount_parent_class)->finalize) (object);
}
Index: daemon/gvfsbackendlocaltest.c
===================================================================
--- daemon/gvfsbackendlocaltest.c (revisjon 1275)
+++ daemon/gvfsbackendlocaltest.c (arbeidskopi)
@@ -174,7 +174,7 @@
*
*/
-G_DEFINE_TYPE (GVfsBackendLocalTest, g_vfs_backend_localtest, G_VFS_TYPE_BACKEND);
+G_DEFINE_TYPE (GVfsBackendLocalTest, g_vfs_backend_localtest, G_VFS_TYPE_BACKEND)
static void
g_vfs_backend_localtest_init (GVfsBackendLocalTest *backend)
@@ -599,7 +599,7 @@
}
}
-
+#if 0
static void
do_copy (GVfsBackend *backend,
GVfsJobCopy *job,
@@ -636,8 +636,8 @@
g_print (" (EE) try_copy: file == NULL \n");
}
}
+#endif
-
static void
do_move (GVfsBackend *backend,
GVfsJobMove *job,
Index: daemon/gvfsreadchannel.c
===================================================================
--- daemon/gvfsreadchannel.c (revisjon 1275)
+++ daemon/gvfsreadchannel.c (arbeidskopi)
@@ -27,7 +27,6 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
-#include <unistd.h>
#include <fcntl.h>
#include <glib.h>
@@ -65,10 +64,6 @@
static void
g_vfs_read_channel_finalize (GObject *object)
{
- GVfsReadChannel *read_channel;
-
- read_channel = G_VFS_READ_CHANNEL (object);
-
if (G_OBJECT_CLASS (g_vfs_read_channel_parent_class)->finalize)
(*G_OBJECT_CLASS (g_vfs_read_channel_parent_class)->finalize) (object);
}
@@ -177,7 +172,7 @@
default:
g_set_error (error, G_IO_ERROR,
G_IO_ERROR_FAILED,
- "Unknown stream command %d\n", command);
+ "Unknown stream command %"G_GINT32_FORMAT"\n", command);
break;
}
Index: daemon/gvfsjobqueryfsinfo.c
===================================================================
--- daemon/gvfsjobqueryfsinfo.c (revisjon 1275)
+++ daemon/gvfsjobqueryfsinfo.c (arbeidskopi)
@@ -34,7 +34,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonprotocol.h"
-G_DEFINE_TYPE (GVfsJobQueryFsInfo, g_vfs_job_query_fs_info, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobQueryFsInfo, g_vfs_job_query_fs_info, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsjobclosewrite.c
===================================================================
--- daemon/gvfsjobclosewrite.c (revisjon 1275)
+++ daemon/gvfsjobclosewrite.c (arbeidskopi)
@@ -33,7 +33,7 @@
#include "gvfsjobclosewrite.h"
#include "gvfsdaemonutils.h"
-G_DEFINE_TYPE (GVfsJobCloseWrite, g_vfs_job_close_write, G_VFS_TYPE_JOB);
+G_DEFINE_TYPE (GVfsJobCloseWrite, g_vfs_job_close_write, G_VFS_TYPE_JOB)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsbackendsmbbrowse.c
===================================================================
--- daemon/gvfsbackendsmbbrowse.c (revisjon 1275)
+++ daemon/gvfsbackendsmbbrowse.c (arbeidskopi)
@@ -77,7 +77,7 @@
char *username;
} CachedServer;
-G_DEFINE_TYPE (GVfsBackendSmbBrowse, g_vfs_backend_smb_browse, G_VFS_TYPE_BACKEND);
+G_DEFINE_TYPE (GVfsBackendSmbBrowse, g_vfs_backend_smb_browse, G_VFS_TYPE_BACKEND)
static char *
normalize_smb_name_helper (const char *name, gssize len, gboolean valid_utf8)
@@ -447,7 +447,7 @@
{
unsigned int dirlen;
- g_print ("type: %d, name: %s\n", dirp->smbc_type, dirp->name);
+ g_print ("type: %u, name: %s\n", dirp->smbc_type, dirp->name);
if (dirp->smbc_type != SMBC_IPC_SHARE &&
dirp->smbc_type != SMBC_COMMS_SHARE &&
@@ -756,12 +756,10 @@
const char *filename,
GMountSource *mount_source)
{
- GFileInfo *info;
BrowseEntry *entry;
GError *error = NULL;
GMountSpec *mount_spec;
- info = NULL;
g_mutex_lock (backend->entries_lock);
entry = find_entry_unlocked (backend, filename);
Index: daemon/gvfsjobtrash.c
===================================================================
--- daemon/gvfsjobtrash.c (revisjon 1275)
+++ daemon/gvfsjobtrash.c (arbeidskopi)
@@ -34,7 +34,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonprotocol.h"
-G_DEFINE_TYPE (GVfsJobTrash, g_vfs_job_trash, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobTrash, g_vfs_job_trash, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsjobsetdisplayname.c
===================================================================
--- daemon/gvfsjobsetdisplayname.c (revisjon 1275)
+++ daemon/gvfsjobsetdisplayname.c (arbeidskopi)
@@ -34,7 +34,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonprotocol.h"
-G_DEFINE_TYPE (GVfsJobSetDisplayName, g_vfs_job_set_display_name, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobSetDisplayName, g_vfs_job_set_display_name, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsjobopenforwrite.c
===================================================================
--- daemon/gvfsjobopenforwrite.c (revisjon 1275)
+++ daemon/gvfsjobopenforwrite.c (arbeidskopi)
@@ -35,7 +35,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonutils.h"
-G_DEFINE_TYPE (GVfsJobOpenForWrite, g_vfs_job_open_for_write, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobOpenForWrite, g_vfs_job_open_for_write, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
@@ -267,7 +267,6 @@
GError *error;
int remote_fd;
int fd_id;
- gboolean res;
dbus_bool_t can_seek;
guint64 initial_offset;
@@ -292,11 +291,11 @@
reply = dbus_message_new_method_return (message);
can_seek = open_job->can_seek;
initial_offset = open_job->initial_offset;
- res = dbus_message_append_args (reply,
- DBUS_TYPE_UINT32, &fd_id,
- DBUS_TYPE_BOOLEAN, &can_seek,
- DBUS_TYPE_UINT64, &initial_offset,
- DBUS_TYPE_INVALID);
+ dbus_message_append_args (reply,
+ DBUS_TYPE_UINT32, &fd_id,
+ DBUS_TYPE_BOOLEAN, &can_seek,
+ DBUS_TYPE_UINT64, &initial_offset,
+ DBUS_TYPE_INVALID);
g_vfs_channel_set_backend_handle (G_VFS_CHANNEL (channel), open_job->backend_handle);
open_job->backend_handle = NULL;
Index: daemon/gvfswritechannel.c
===================================================================
--- daemon/gvfswritechannel.c (revisjon 1275)
+++ daemon/gvfswritechannel.c (arbeidskopi)
@@ -28,7 +28,6 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
-#include <unistd.h>
#include <fcntl.h>
#include <glib.h>
@@ -61,10 +60,6 @@
static void
g_vfs_write_channel_finalize (GObject *object)
{
- GVfsWriteChannel *write_channel;
-
- write_channel = G_VFS_WRITE_CHANNEL (object);
-
if (G_OBJECT_CLASS (g_vfs_write_channel_parent_class)->finalize)
(*G_OBJECT_CLASS (g_vfs_write_channel_parent_class)->finalize) (object);
}
@@ -144,7 +139,7 @@
default:
g_set_error (error, G_IO_ERROR,
G_IO_ERROR_FAILED,
- "Unknown stream command %d\n", command);
+ "Unknown stream command %"G_GINT32_FORMAT"\n", command);
break;
}
Index: daemon/soup-output-stream.c
===================================================================
--- daemon/soup-output-stream.c (revisjon 1275)
+++ daemon/soup-output-stream.c (arbeidskopi)
@@ -30,7 +30,7 @@
#include "soup-output-stream.h"
#include "soup-input-stream.h"
-G_DEFINE_TYPE (SoupOutputStream, soup_output_stream, G_TYPE_OUTPUT_STREAM);
+G_DEFINE_TYPE (SoupOutputStream, soup_output_stream, G_TYPE_OUTPUT_STREAM)
typedef void (*SoupOutputStreamCallback) (GOutputStream *);
@@ -267,7 +267,7 @@
return count;
}
-static gboolean
+static int
soup_output_stream_close (GOutputStream *stream,
GCancellable *cancellable,
GError **error)
Index: daemon/gvfsjobmount.c
===================================================================
--- daemon/gvfsjobmount.c (revisjon 1275)
+++ daemon/gvfsjobmount.c (arbeidskopi)
@@ -34,7 +34,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonprotocol.h"
-G_DEFINE_TYPE (GVfsJobMount, g_vfs_job_mount, G_VFS_TYPE_JOB);
+G_DEFINE_TYPE (GVfsJobMount, g_vfs_job_mount, G_VFS_TYPE_JOB)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsjobdelete.c
===================================================================
--- daemon/gvfsjobdelete.c (revisjon 1275)
+++ daemon/gvfsjobdelete.c (arbeidskopi)
@@ -34,7 +34,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonprotocol.h"
-G_DEFINE_TYPE (GVfsJobDelete, g_vfs_job_delete, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobDelete, g_vfs_job_delete, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsjobseekwrite.c
===================================================================
--- daemon/gvfsjobseekwrite.c (revisjon 1275)
+++ daemon/gvfsjobseekwrite.c (arbeidskopi)
@@ -33,7 +33,7 @@
#include "gvfsjobseekwrite.h"
#include "gvfsdaemonutils.h"
-G_DEFINE_TYPE (GVfsJobSeekWrite, g_vfs_job_seek_write, G_VFS_TYPE_JOB);
+G_DEFINE_TYPE (GVfsJobSeekWrite, g_vfs_job_seek_write, G_VFS_TYPE_JOB)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsjobopenforread.c
===================================================================
--- daemon/gvfsjobopenforread.c (revisjon 1275)
+++ daemon/gvfsjobopenforread.c (arbeidskopi)
@@ -35,7 +35,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonutils.h"
-G_DEFINE_TYPE (GVfsJobOpenForRead, g_vfs_job_open_for_read, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobOpenForRead, g_vfs_job_open_for_read, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
@@ -177,7 +177,6 @@
GError *error;
int remote_fd;
int fd_id;
- gboolean res;
dbus_bool_t can_seek;
g_assert (open_job->backend_handle != NULL);
@@ -200,10 +199,10 @@
reply = dbus_message_new_method_return (message);
can_seek = open_job->can_seek;
- res = dbus_message_append_args (reply,
- DBUS_TYPE_UINT32, &fd_id,
- DBUS_TYPE_BOOLEAN, &can_seek,
- DBUS_TYPE_INVALID);
+ dbus_message_append_args (reply,
+ DBUS_TYPE_UINT32, &fd_id,
+ DBUS_TYPE_BOOLEAN, &can_seek,
+ DBUS_TYPE_INVALID);
g_vfs_channel_set_backend_handle (G_VFS_CHANNEL (channel), open_job->backend_handle);
open_job->backend_handle = NULL;
Index: daemon/gvfsbackendftp.c
===================================================================
--- daemon/gvfsbackendftp.c (revisjon 1275)
+++ daemon/gvfsbackendftp.c (arbeidskopi)
@@ -58,15 +58,11 @@
gboolean mount_try_again;
};
-G_DEFINE_TYPE (GVfsBackendFtp, g_vfs_backend_ftp, G_VFS_TYPE_BACKEND);
+G_DEFINE_TYPE (GVfsBackendFtp, g_vfs_backend_ftp, G_VFS_TYPE_BACKEND)
static void
g_vfs_backend_ftp_finalize (GObject *object)
{
- GVfsBackendFtp *backend;
-
- backend = G_VFS_BACKEND_FTP (object);
-
if (G_OBJECT_CLASS (g_vfs_backend_ftp_parent_class)->finalize)
(*G_OBJECT_CLASS (g_vfs_backend_ftp_parent_class)->finalize) (object);
}
@@ -101,7 +97,7 @@
#if 0
GVfsBackendFtp *op_backend = G_VFS_BACKEND_FTP (backend);
#endif
- const char *server, *share, *user, *domain;
+ const char *server, *share; /* *domain, *user; */
server = g_mount_spec_get (mount_spec, "server");
share = g_mount_spec_get (mount_spec, "share");
@@ -113,9 +109,10 @@
_("No hostname specified"));
return TRUE;
}
-
+#if 0
user = g_mount_spec_get (mount_spec, "user");
domain = g_mount_spec_get (mount_spec, "domain");
+#endif
/* TODO */
Index: daemon/gvfsjobmountmountable.c
===================================================================
--- daemon/gvfsjobmountmountable.c (revisjon 1275)
+++ daemon/gvfsjobmountmountable.c (arbeidskopi)
@@ -34,7 +34,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonutils.h"
-G_DEFINE_TYPE (GVfsJobMountMountable, g_vfs_job_mount_mountable, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobMountMountable, g_vfs_job_mount_mountable, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsjobread.c
===================================================================
--- daemon/gvfsjobread.c (revisjon 1275)
+++ daemon/gvfsjobread.c (arbeidskopi)
@@ -33,7 +33,7 @@
#include "gvfsjobread.h"
#include "gvfsdaemonutils.h"
-G_DEFINE_TYPE (GVfsJobRead, g_vfs_job_read, G_VFS_TYPE_JOB);
+G_DEFINE_TYPE (GVfsJobRead, g_vfs_job_read, G_VFS_TYPE_JOB)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
@@ -96,7 +96,7 @@
send_reply (GVfsJob *job)
{
GVfsJobRead *op_job = G_VFS_JOB_READ (job);
- g_print ("job_read send reply, %"G_GSSIZE_FORMAT" bytes\n", op_job->data_count);
+ g_print ("job_read send reply, %"G_GSIZE_FORMAT" bytes\n", op_job->data_count);
if (job->failed)
g_vfs_channel_send_error (G_VFS_CHANNEL (op_job->channel), job->error);
Index: daemon/gvfsjobqueryattributes.c
===================================================================
--- daemon/gvfsjobqueryattributes.c (revisjon 1275)
+++ daemon/gvfsjobqueryattributes.c (arbeidskopi)
@@ -35,7 +35,7 @@
#include "gvfsdaemonprotocol.h"
#include "gvfsjobqueryattributes.h"
-G_DEFINE_TYPE (GVfsJobQueryAttributes, g_vfs_job_query_attributes, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobQueryAttributes, g_vfs_job_query_attributes, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsjobsetattribute.c
===================================================================
--- daemon/gvfsjobsetattribute.c (revisjon 1275)
+++ daemon/gvfsjobsetattribute.c (arbeidskopi)
@@ -35,7 +35,7 @@
#include "gvfsdaemonprotocol.h"
#include "gvfsjobsetattribute.h"
-G_DEFINE_TYPE (GVfsJobSetAttribute, g_vfs_job_set_attribute, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobSetAttribute, g_vfs_job_set_attribute, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsbackendsftp.c
===================================================================
--- daemon/gvfsbackendsftp.c (revisjon 1275)
+++ daemon/gvfsbackendsftp.c (arbeidskopi)
@@ -143,7 +143,7 @@
GFileAttributeMatcher *attribute_matcher);
-G_DEFINE_TYPE (GVfsBackendSftp, g_vfs_backend_sftp, G_VFS_TYPE_BACKEND);
+G_DEFINE_TYPE (GVfsBackendSftp, g_vfs_backend_sftp, G_VFS_TYPE_BACKEND)
static void
data_buffer_free (DataBuffer *buffer)
@@ -790,7 +790,7 @@
g_hash_table_remove (backend->expected_replies, GINT_TO_POINTER (id));
}
else
- g_warning ("Got unhandled reply of size %d for id %d\n", backend->reply_size, id);
+ g_warning ("Got unhandled reply of size %"G_GUINT32_FORMAT" for id %"G_GUINT32_FORMAT"\n", backend->reply_size, id);
g_object_unref (reply);
@@ -980,7 +980,6 @@
GDataInputStream *reply;
GFileInfo *info;
int type;
- guint32 id;
command = new_command_stream (backend, SSH_FXP_STAT, NULL);
put_string (command, ".");
@@ -991,7 +990,6 @@
return FALSE;
type = g_data_input_stream_read_byte (reply, NULL, NULL);
- id = g_data_input_stream_read_uint32 (reply, NULL, NULL);
/* On error, set uid to -1 and ignore */
backend->my_uid = (guint32)-1;
@@ -1602,16 +1600,16 @@
if (reply_type == SSH_FXP_HANDLE)
{
GDataOutputStream *command;
- DataBuffer *handle;
+ DataBuffer *bhandle;
guint32 id;
- handle = read_data_buffer (reply);
+ bhandle = read_data_buffer (reply);
command = new_command_stream (backend, SSH_FXP_CLOSE, &id);
- put_data_buffer (command, handle);
+ put_data_buffer (command, bhandle);
queue_command_stream_and_free (backend, command, id, NULL, G_VFS_JOB (job), NULL);
- data_buffer_free (handle);
+ data_buffer_free (bhandle);
}
return;
@@ -2688,7 +2686,6 @@
gpointer user_data)
{
ReadDirData *data;
- guint32 count;
GFileInfo *info = user_data;
char *target;
@@ -2696,7 +2693,6 @@
if (reply_type == SSH_FXP_NAME)
{
- count = g_data_input_stream_read_uint32 (reply, NULL, NULL);
target = read_string (reply, NULL);
if (target)
{
@@ -2793,7 +2789,6 @@
GVfsJobEnumerate *enum_job;
guint32 count;
int i;
- GList *infos;
guint32 id;
GDataOutputStream *command;
ReadDirData *data;
@@ -2820,7 +2815,6 @@
return;
}
- infos = NULL;
count = g_data_input_stream_read_uint32 (reply, NULL, NULL);
for (i = 0; i < count; i++)
{
Index: daemon/gvfsjobdbus.c
===================================================================
--- daemon/gvfsjobdbus.c (revisjon 1275)
+++ daemon/gvfsjobdbus.c (arbeidskopi)
@@ -33,7 +33,7 @@
#include "gvfsjobdbus.h"
#include "gdbusutils.h"
-G_DEFINE_TYPE (GVfsJobDBus, g_vfs_job_dbus, G_VFS_TYPE_JOB);
+G_DEFINE_TYPE (GVfsJobDBus, g_vfs_job_dbus, G_VFS_TYPE_JOB)
/* TODO: Real P_() */
#define P_(_x) (_x)
Index: daemon/gvfsjobmove.c
===================================================================
--- daemon/gvfsjobmove.c (revisjon 1275)
+++ daemon/gvfsjobmove.c (arbeidskopi)
@@ -35,7 +35,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonprotocol.h"
-G_DEFINE_TYPE (GVfsJobMove, g_vfs_job_move, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobMove, g_vfs_job_move, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsbackendcdda.c
===================================================================
--- daemon/gvfsbackendcdda.c (revisjon 1275)
+++ daemon/gvfsbackendcdda.c (arbeidskopi)
@@ -91,7 +91,7 @@
int num_open_files;
};
-G_DEFINE_TYPE (GVfsBackendCdda, g_vfs_backend_cdda, G_VFS_TYPE_BACKEND);
+G_DEFINE_TYPE (GVfsBackendCdda, g_vfs_backend_cdda, G_VFS_TYPE_BACKEND)
static void
g_vfs_backend_cdda_finalize (GObject *object)
Index: daemon/gvfsdaemon.c
===================================================================
--- daemon/gvfsdaemon.c (revisjon 1275)
+++ daemon/gvfsdaemon.c (arbeidskopi)
@@ -98,7 +98,7 @@
gpointer data);
-G_DEFINE_TYPE (GVfsDaemon, g_vfs_daemon, G_TYPE_OBJECT);
+G_DEFINE_TYPE (GVfsDaemon, g_vfs_daemon, G_TYPE_OBJECT)
static void
registered_path_free (RegisteredPath *data)
@@ -189,10 +189,11 @@
const GValue *value,
GParamSpec *pspec)
{
+#if 0
GVfsDaemon *daemon;
daemon = G_VFS_DAEMON (object);
-
+#endif
switch (prop_id)
{
default:
@@ -207,10 +208,11 @@
GValue *value,
GParamSpec *pspec)
{
+#if 0
GVfsDaemon *daemon;
daemon = G_VFS_DAEMON (object);
-
+#endif
switch (prop_id)
{
default:
Index: daemon/gvfsjobcopy.c
===================================================================
--- daemon/gvfsjobcopy.c (revisjon 1275)
+++ daemon/gvfsjobcopy.c (arbeidskopi)
@@ -35,7 +35,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonprotocol.h"
-G_DEFINE_TYPE (GVfsJobCopy, g_vfs_job_copy, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobCopy, g_vfs_job_copy, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsbackendcomputer.c
===================================================================
--- daemon/gvfsbackendcomputer.c (revisjon 1275)
+++ daemon/gvfsbackendcomputer.c (arbeidskopi)
@@ -89,7 +89,7 @@
GMountSpec *mount_spec;
};
-G_DEFINE_TYPE (GVfsBackendComputer, g_vfs_backend_computer, G_VFS_TYPE_BACKEND);
+G_DEFINE_TYPE (GVfsBackendComputer, g_vfs_backend_computer, G_VFS_TYPE_BACKEND)
static void
computer_file_free (ComputerFile *file)
Index: daemon/gvfschannel.c
===================================================================
--- daemon/gvfschannel.c (revisjon 1275)
+++ daemon/gvfschannel.c (arbeidskopi)
@@ -28,7 +28,6 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
-#include <unistd.h>
#include <fcntl.h>
#include <glib.h>
Index: daemon/gvfsjobseekread.c
===================================================================
--- daemon/gvfsjobseekread.c (revisjon 1275)
+++ daemon/gvfsjobseekread.c (arbeidskopi)
@@ -33,7 +33,7 @@
#include "gvfsjobseekread.h"
#include "gvfsdaemonutils.h"
-G_DEFINE_TYPE (GVfsJobSeekRead, g_vfs_job_seek_read, G_VFS_TYPE_JOB);
+G_DEFINE_TYPE (GVfsJobSeekRead, g_vfs_job_seek_read, G_VFS_TYPE_JOB)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsbackendburn.c
===================================================================
--- daemon/gvfsbackendburn.c (revisjon 1275)
+++ daemon/gvfsbackendburn.c (arbeidskopi)
@@ -94,7 +94,7 @@
GMountSpec *mount_spec;
};
-G_DEFINE_TYPE (GVfsBackendBurn, g_vfs_backend_burn, G_VFS_TYPE_BACKEND);
+G_DEFINE_TYPE (GVfsBackendBurn, g_vfs_backend_burn, G_VFS_TYPE_BACKEND)
static void virtual_node_unref (VirtualNode *node);
@@ -886,7 +886,7 @@
return TRUE;
}
- g_print ("file: %p, overwrite: %d\n", file, flags & G_FILE_COPY_OVERWRITE);
+ g_print ("file: %p, overwrite: %u\n", file, flags & G_FILE_COPY_OVERWRITE);
if (file != NULL)
{
if (flags & G_FILE_COPY_OVERWRITE)
Index: daemon/gvfsjobmakesymlink.c
===================================================================
--- daemon/gvfsjobmakesymlink.c (revisjon 1275)
+++ daemon/gvfsjobmakesymlink.c (arbeidskopi)
@@ -34,7 +34,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonprotocol.h"
-G_DEFINE_TYPE (GVfsJobMakeSymlink, g_vfs_job_make_symlink, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobMakeSymlink, g_vfs_job_make_symlink, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/soup-input-stream.c
===================================================================
--- daemon/soup-input-stream.c (revisjon 1275)
+++ daemon/soup-input-stream.c (arbeidskopi)
@@ -33,7 +33,7 @@
G_DEFINE_TYPE_WITH_CODE (SoupInputStream, soup_input_stream, G_TYPE_INPUT_STREAM,
G_IMPLEMENT_INTERFACE (G_TYPE_SEEKABLE,
- soup_input_stream_seekable_iface_init));
+ soup_input_stream_seekable_iface_init))
typedef void (*SoupInputStreamCallback) (GInputStream *);
@@ -121,10 +121,8 @@
g_signal_handlers_disconnect_by_func (priv->msg, G_CALLBACK (soup_input_stream_got_chunk), stream);
g_signal_handlers_disconnect_by_func (priv->msg, G_CALLBACK (soup_input_stream_finished), stream);
g_object_unref (priv->msg);
+ g_free (priv->leftover_buffer);
- if (priv->leftover_buffer)
- g_free (priv->leftover_buffer);
-
if (G_OBJECT_CLASS (soup_input_stream_parent_class)->finalize)
(*G_OBJECT_CLASS (soup_input_stream_parent_class)->finalize) (object);
}
@@ -460,11 +458,9 @@
GCancellable *cancellable,
GError **error)
{
- SoupInputStreamPrivate *priv;
gboolean result;
g_return_val_if_fail (SOUP_IS_INPUT_STREAM (stream), FALSE);
- priv = SOUP_INPUT_STREAM_GET_PRIVATE (stream);
if (!g_input_stream_set_pending (stream, error))
return FALSE;
@@ -647,11 +643,9 @@
GAsyncReadyCallback callback,
gpointer user_data)
{
- SoupInputStreamPrivate *priv = SOUP_INPUT_STREAM_GET_PRIVATE (stream);
GError *error = NULL;
g_return_if_fail (SOUP_IS_INPUT_STREAM (stream));
- priv = SOUP_INPUT_STREAM_GET_PRIVATE (stream);
if (!g_input_stream_set_pending (stream, &error))
{
Index: daemon/gvfsbackendhttp.c
===================================================================
--- daemon/gvfsbackendhttp.c (revisjon 1275)
+++ daemon/gvfsbackendhttp.c (arbeidskopi)
@@ -52,7 +52,7 @@
#include "soup-input-stream.h"
-G_DEFINE_TYPE (GVfsBackendHttp, g_vfs_backend_http, G_VFS_TYPE_BACKEND);
+G_DEFINE_TYPE (GVfsBackendHttp, g_vfs_backend_http, G_VFS_TYPE_BACKEND)
static void
g_vfs_backend_http_finalize (GObject *object)
@@ -195,12 +195,9 @@
const char *method,
const char *filename)
{
- GVfsBackendHttp *op_backend;
SoupMessage *msg;
SoupURI *uri;
- op_backend = G_VFS_BACKEND_HTTP (backend);
-
uri = g_vfs_backend_uri_for_filename (backend, filename);
msg = message_new_from_uri (method, uri);
@@ -361,10 +358,8 @@
char *buffer,
gsize bytes_requested)
{
- GVfsBackendHttp *op_backend;
GInputStream *stream;
- op_backend = G_VFS_BACKEND_HTTP (backend);
stream = G_INPUT_STREAM (handle);
g_input_stream_read_async (stream,
@@ -384,11 +379,9 @@
goffset offset,
GSeekType type)
{
- GVfsBackendHttp *op_backend;
GInputStream *stream;
GError *error = NULL;
- op_backend = G_VFS_BACKEND_HTTP (backend);
stream = G_INPUT_STREAM (handle);
if (!g_seekable_seek (G_SEEKABLE (stream), offset, type,
@@ -446,10 +439,8 @@
GVfsJobCloseRead *job,
GVfsBackendHandle handle)
{
- GVfsBackendHttp *op_backend;
GInputStream *stream;
- op_backend = G_VFS_BACKEND_HTTP (backend);
stream = G_INPUT_STREAM (handle);
g_input_stream_close_async (stream,
@@ -457,7 +448,6 @@
G_VFS_JOB (job)->cancellable,
close_read_ready,
job);
-
return TRUE;
}
Index: daemon/gvfsbackendtrash.c
===================================================================
--- daemon/gvfsbackendtrash.c (revisjon 1275)
+++ daemon/gvfsbackendtrash.c (arbeidskopi)
@@ -113,7 +113,7 @@
G_LOCK_DEFINE_STATIC(root_monitor);
-G_DEFINE_TYPE (GVfsBackendTrash, g_vfs_backend_trash, G_VFS_TYPE_BACKEND);
+G_DEFINE_TYPE (GVfsBackendTrash, g_vfs_backend_trash, G_VFS_TYPE_BACKEND)
static void schedule_update_trash_files (GVfsBackendTrash *backend,
gboolean update_trash_dirs);
@@ -201,7 +201,7 @@
{
char *trashname;
trashname = g_strndup (escaped_dir + 1, len - 1);
- return g_build_filename (g_get_user_data_dir (), "Trash", trashname, NULL);
+ g_build_filename (g_get_user_data_dir (), "Trash", trashname, NULL);
g_free (trashname);
}
@@ -253,7 +253,7 @@
return g_path_get_dirname (trash_dir);
}
- user_trash_basename = g_strdup_printf (".Trash-%d", getuid());
+ user_trash_basename = g_strdup_printf (".Trash-%u", getuid());
if (strcmp (basename, user_trash_basename) == 0)
{
g_free (user_trash_basename);
@@ -262,7 +262,7 @@
}
g_free (user_trash_basename);
- user_sys_dir = g_strdup_printf ("%d", getuid());
+ user_sys_dir = g_strdup_printf ("%u", getuid());
if (strcmp (basename, user_sys_dir) == 0)
{
g_free (user_sys_dir);
@@ -347,7 +347,7 @@
statbuf.st_mode & S_ISVTX)
{
/* We have a valid sysadmin .Trash dir, look for uid subdir */
- sysadmin_dir_uid = g_strdup_printf ("%s/%d", sysadmin_dir, getuid());
+ sysadmin_dir_uid = g_strdup_printf ("%s/%u", sysadmin_dir, getuid());
if (lstat (sysadmin_dir_uid, &statbuf) == 0 &&
S_ISDIR (statbuf.st_mode) &&
@@ -363,7 +363,7 @@
}
g_free (sysadmin_dir);
- user_trash_basename = g_strdup_printf (".Trash-%d", getuid());
+ user_trash_basename = g_strdup_printf (".Trash-%u", getuid());
user_trash = g_build_filename (topdir, user_trash_basename, NULL);
g_free (user_trash_basename);
@@ -514,18 +514,14 @@
GList *topdirs;
GList *topdirs_info;
struct stat statbuf;
- gboolean has_trash_files;
dirs = NULL;
- has_trash_files = FALSE;
home_trash = g_build_filename (g_get_user_data_dir (), "Trash", NULL);
if (lstat (home_trash, &statbuf) == 0 &&
S_ISDIR (statbuf.st_mode))
{
dirs = g_list_prepend (dirs, home_trash);
- if (statbuf.st_nlink != 2)
- has_trash_files = TRUE;;
}
else
g_free (home_trash);
@@ -553,7 +549,7 @@
if (info & HAS_SYSTEM_DIR)
{
- basename = g_strdup_printf ("%d", getuid());
+ basename = g_strdup_printf ("%u", getuid());
trashdir = g_build_filename (topdir, ".Trash", basename, NULL);
g_free (basename);
dirs = g_list_prepend (dirs, trashdir);
@@ -561,14 +557,11 @@
if (info & HAS_USER_DIR)
{
- basename = g_strdup_printf (".Trash-%d", getuid());
+ basename = g_strdup_printf (".Trash-%u", getuid());
trashdir = g_build_filename (topdir, basename, NULL);
g_free (basename);
dirs = g_list_prepend (dirs, trashdir);
}
-
- if (info & HAS_TRASH_FILES)
- has_trash_files = TRUE;
}
return g_list_reverse (dirs);
@@ -1118,7 +1111,6 @@
GFile *file;
GFileEnumerator *enumerator;
GFileInfo *info;
- const char *name;
char *dir;
GError *error;
@@ -1142,8 +1134,6 @@
G_VFS_JOB (job)->cancellable,
NULL)) != NULL)
{
- name = g_file_info_get_name (info);
-
g_vfs_job_enumerate_add_info (job, info);
g_object_unref (info);
}
Index: daemon/main.c
===================================================================
--- daemon/main.c (revisjon 1275)
+++ daemon/main.c (arbeidskopi)
@@ -97,19 +97,19 @@
if (!no_fuse)
{
char *fuse_path;
- char *argv[3];
+ char *argv2[3];
fuse_path = g_build_filename (g_get_home_dir (), ".gvfs", NULL);
if (!g_file_test (fuse_path, G_FILE_TEST_EXISTS))
g_mkdir (fuse_path, 0700);
- argv[0] = LIBEXEC_DIR "/gvfs-fuse-daemon";
- argv[1] = fuse_path;
- argv[2] = NULL;
+ argv2[0] = LIBEXEC_DIR "/gvfs-fuse-daemon";
+ argv2[1] = fuse_path;
+ argv2[2] = NULL;
g_spawn_async (NULL,
- argv,
+ argv2,
NULL,
G_SPAWN_STDOUT_TO_DEV_NULL |
G_SPAWN_STDERR_TO_DEV_NULL,
Index: daemon/dbus-gmain.c
===================================================================
--- daemon/dbus-gmain.c (revisjon 1275)
+++ daemon/dbus-gmain.c (arbeidskopi)
@@ -291,7 +291,7 @@
handler->cs = cs;
handler->watch = watch;
- channel = g_io_channel_unix_new (dbus_watch_get_fd (watch));
+ channel = g_io_channel_unix_new (dbus_watch_get_unix_fd (watch));
handler->source = g_io_create_watch (channel, condition);
g_source_set_callback (handler->source, (GSourceFunc) io_handler_dispatch, handler,
Index: daemon/gvfsjobcreatemonitor.c
===================================================================
--- daemon/gvfsjobcreatemonitor.c (revisjon 1275)
+++ daemon/gvfsjobcreatemonitor.c (arbeidskopi)
@@ -34,7 +34,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonutils.h"
-G_DEFINE_TYPE (GVfsJobCreateMonitor, g_vfs_job_create_monitor, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobCreateMonitor, g_vfs_job_create_monitor, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: daemon/gvfsjobunmountmountable.c
===================================================================
--- daemon/gvfsjobunmountmountable.c (revisjon 1275)
+++ daemon/gvfsjobunmountmountable.c (arbeidskopi)
@@ -34,7 +34,7 @@
#include "gdbusutils.h"
#include "gvfsdaemonutils.h"
-G_DEFINE_TYPE (GVfsJobUnmountMountable, g_vfs_job_unmount_mountable, G_VFS_TYPE_JOB_DBUS);
+G_DEFINE_TYPE (GVfsJobUnmountMountable, g_vfs_job_unmount_mountable, G_VFS_TYPE_JOB_DBUS)
static void run (GVfsJob *job);
static gboolean try (GVfsJob *job);
Index: hal/ghalmount.c
===================================================================
--- hal/ghalmount.c (revisjon 1275)
+++ hal/ghalmount.c (arbeidskopi)
@@ -138,7 +138,7 @@
{
}
-const static struct {
+static const struct {
const char *disc_type;
const char *icon_name;
char *ui_name;
@@ -161,7 +161,7 @@
{"hddvd_r", "media-optical-hddvd-r", N_("HD DVD-R Disc"), N_("Blank HD DVD-R Disc")},
{"hddvd_rw", "media-optical-hddvd-rw", N_("HD DVD-RW Disc"), N_("Blank HD DVD-RW Disc")},
{"mo", "media-optical-mo", N_("MO Disc"), N_("Blank MO Disc")},
- {NULL, "media-optical", N_("Disc"), N_("Blank Disc")},
+ {NULL, "media-optical", N_("Disc"), N_("Blank Disc")}
};
static const char *
@@ -372,7 +372,6 @@
const char *drive_type;
const char *drive_bus;
- gboolean drive_uses_removable_media;
const char *volume_fs_label;
guint64 volume_size;
gboolean volume_is_disc;
@@ -386,7 +385,6 @@
drive_type = hal_device_get_property_string (drive, "storage.drive_type");
drive_bus = hal_device_get_property_string (drive, "storage.bus");
- drive_uses_removable_media = hal_device_get_property_bool (drive, "storage.removable");
volume_fs_label = hal_device_get_property_string (volume, "volume.label");
volume_size = hal_device_get_property_uint64 (volume, "volume.size");
volume_is_disc = hal_device_get_property_bool (volume, "volume.is_disc");
@@ -589,8 +587,7 @@
void
g_hal_mount_override_name (GHalMount *mount, const char *name)
{
- if (mount->override_name != NULL)
- g_free (mount->override_name);
+ g_free (mount->override_name);
if (name != NULL)
mount->override_name = g_strdup (name);
@@ -1155,8 +1152,7 @@
{
if (data->root)
g_object_unref (data->root);
- if (data->original_path)
- g_free (data->original_path);
+ g_free (data->original_path);
if (data->split_path)
g_strfreev (data->split_path);
if (data->enumerator)
Index: hal/hal-device.c
===================================================================
--- hal/hal-device.c (revisjon 1275)
+++ hal/hal-device.c (arbeidskopi)
@@ -40,7 +40,7 @@
static guint signals[LAST_SIGNAL] = { 0 };
-G_DEFINE_DYNAMIC_TYPE (HalDevice, hal_device, G_TYPE_OBJECT);
+G_DEFINE_DYNAMIC_TYPE (HalDevice, hal_device, G_TYPE_OBJECT)
static void
hal_device_finalize (HalDevice *device)
Index: hal/ghalvolume.c
===================================================================
--- hal/ghalvolume.c (revisjon 1275)
+++ hal/ghalvolume.c (arbeidskopi)
@@ -129,7 +129,7 @@
{
}
-const static struct {
+static const struct {
const char *disc_type;
const char *icon_name;
char *ui_name;
@@ -152,7 +152,7 @@
{"hddvd_r", "media-optical-hddvd-r", N_("HD DVD-R Disc"), N_("Blank HD DVD-R Disc")},
{"hddvd_rw", "media-optical-hddvd-rw", N_("HD DVD-RW Disc"), N_("Blank HD DVD-RW Disc")},
{"mo", "media-optical-mo", N_("MO Disc"), N_("Blank MO Disc")},
- {NULL, "media-optical", N_("Disc"), N_("Blank Disc")},
+ {NULL, "media-optical", N_("Disc"), N_("Blank Disc")}
};
static const char *
@@ -205,9 +205,6 @@
static void
do_update_from_hal (GHalVolume *mv)
{
- const char *drive_type;
- const char *drive_bus;
- gboolean drive_uses_removable_media;
const char *volume_fs_label;
guint64 volume_size;
gboolean volume_is_disc;
@@ -225,9 +222,6 @@
volume = mv->device;
drive = mv->drive_device;
- drive_type = hal_device_get_property_string (drive, "storage.drive_type");
- drive_bus = hal_device_get_property_string (drive, "storage.bus");
- drive_uses_removable_media = hal_device_get_property_bool (drive, "storage.removable");
volume_fs_label = hal_device_get_property_string (volume, "volume.label");
volume_size = hal_device_get_property_uint64 (volume, "volume.size");
volume_is_disc = hal_device_get_property_bool (volume, "volume.is_disc");
Index: hal/hal-pool.c
===================================================================
--- hal/hal-pool.c (revisjon 1275)
+++ hal/hal-pool.c (arbeidskopi)
@@ -49,7 +49,7 @@
GHashTable *devices;
};
-G_DEFINE_DYNAMIC_TYPE (HalPool, hal_pool, G_TYPE_OBJECT);
+G_DEFINE_DYNAMIC_TYPE (HalPool, hal_pool, G_TYPE_OBJECT)
static void
hal_pool_finalize (HalPool *pool)
Index: hal/ghalvolumemonitor.c
===================================================================
--- hal/ghalvolumemonitor.c (revisjon 1275)
+++ hal/ghalvolumemonitor.c (arbeidskopi)
@@ -54,7 +54,7 @@
HalPool *pool;
- GList *last_camera_devices;;
+ GList *last_camera_devices;
GList *last_optical_disc_devices;
GList *last_drive_devices;
GList *last_volume_devices;
@@ -88,7 +88,7 @@
static void update_cameras (GHalVolumeMonitor *monitor);
#define g_hal_volume_monitor_get_type g_hal_volume_monitor_get_type
-G_DEFINE_DYNAMIC_TYPE (GHalVolumeMonitor, g_hal_volume_monitor, G_TYPE_NATIVE_VOLUME_MONITOR);
+G_DEFINE_DYNAMIC_TYPE (GHalVolumeMonitor, g_hal_volume_monitor, G_TYPE_NATIVE_VOLUME_MONITOR)
static HalPool *
get_hal_pool (void)
Index: client/httpuri.c
===================================================================
--- client/httpuri.c (revisjon 1275)
+++ client/httpuri.c (arbeidskopi)
@@ -214,10 +214,10 @@
}
else
{
- GDecodedUri *uri;
+ GDecodedUri *decoded_uri;
int port_num;
- uri = g_new0 (GDecodedUri, 1);
+ decoded_uri = g_new0 (GDecodedUri, 1);
ssl = g_vfs_uri_mount_info_get (info, "ssl");
host = g_vfs_uri_mount_info_get (info, "host");
@@ -225,20 +225,20 @@
port = g_vfs_uri_mount_info_get (info, "port");
if (ssl && strcmp (ssl, "true") == 0)
- uri->scheme = g_strdup ("davs");
+ decoded_uri->scheme = g_strdup ("davs");
else
- uri->scheme = g_strdup ("dav");
+ decoded_uri->scheme = g_strdup ("dav");
- uri->host = g_strdup (host);
- uri->userinfo = g_strdup (user);
+ decoded_uri->host = g_strdup (host);
+ decoded_uri->userinfo = g_strdup (user);
if (port && (port_num = atoi (port)))
- uri->port = port_num;
+ decoded_uri->port = port_num;
- uri->path = g_strdup (info->path);
+ decoded_uri->path = g_strdup (info->path);
- res = g_vfs_encode_uri (uri, allow_utf8);
- g_vfs_decoded_uri_free (uri);
+ res = g_vfs_encode_uri (decoded_uri, allow_utf8);
+ g_vfs_decoded_uri_free (decoded_uri);
}
return res;
@@ -285,11 +285,8 @@
static void
g_vfs_uri_mapper_http_class_init (GVfsUriMapperHttpClass *class)
{
- GObjectClass *object_class;
GVfsUriMapperClass *mapper_class;
- object_class = (GObjectClass *) class;
-
mapper_class = G_VFS_URI_MAPPER_CLASS (class);
mapper_class->get_handled_schemes = http_get_handled_schemes;
mapper_class->from_uri = http_from_uri;
Index: client/smburi.c
===================================================================
--- client/smburi.c (revisjon 1275)
+++ client/smburi.c (arbeidskopi)
@@ -269,10 +269,8 @@
static void
g_vfs_uri_mapper_smb_class_init (GVfsUriMapperSmbClass *class)
{
- GObjectClass *object_class;
GVfsUriMapperClass *mapper_class;
- object_class = (GObjectClass *) class;
mapper_class = G_VFS_URI_MAPPER_CLASS (class);
mapper_class->get_handled_schemes = smb_get_handled_schemes;
mapper_class->from_uri = smb_from_uri;
Index: client/gdaemonfileinputstream.c
===================================================================
--- client/gdaemonfileinputstream.c (revisjon 1275)
+++ client/gdaemonfileinputstream.c (arbeidskopi)
@@ -743,10 +743,11 @@
GCancellable *cancellable,
GError **error)
{
+#if 0
GDaemonFileInputStream *file;
file = G_DAEMON_FILE_INPUT_STREAM (stream);
-
+#endif
/* TODO: implement skip */
g_assert_not_reached ();
@@ -1237,10 +1238,6 @@
GCancellable *cancellable,
GError **error)
{
- GDaemonFileInputStream *file;
-
- file = G_DAEMON_FILE_INPUT_STREAM (stream);
-
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "%s", _("The query info operation is not supported"));
return NULL;
@@ -1502,7 +1499,6 @@
gpointer user_data)
{
GDaemonFileInputStream *file;
- AsyncIterator *iterator;
ReadOperation *op;
file = G_DAEMON_FILE_INPUT_STREAM (stream);
@@ -1516,8 +1512,6 @@
op->buffer = buffer;
op->buffer_size = count;
- iterator = g_new0 (AsyncIterator, 1);
-
run_async_state_machine (file,
(state_machine_iterator)iterate_read_state_machine,
op,
@@ -1628,7 +1622,6 @@
gpointer data)
{
GDaemonFileInputStream *file;
- AsyncIterator *iterator;
CloseOperation *op;
file = G_DAEMON_FILE_INPUT_STREAM (stream);
@@ -1636,8 +1629,6 @@
op = g_new0 (CloseOperation, 1);
op->state = CLOSE_STATE_INIT;
- iterator = g_new0 (AsyncIterator, 1);
-
run_async_state_machine (file,
(state_machine_iterator)iterate_close_state_machine,
op, io_priority,
Index: client/gdaemonfileoutputstream.c
===================================================================
--- client/gdaemonfileoutputstream.c (revisjon 1275)
+++ client/gdaemonfileoutputstream.c (arbeidskopi)
@@ -983,10 +983,11 @@
GCancellable *cancellable,
GError **error)
{
+#if 0
GDaemonFileOutputStream *file;
file = G_DAEMON_FILE_OUTPUT_STREAM (stream);
-
+#endif
return NULL;
}
@@ -1246,7 +1247,6 @@
gpointer data)
{
GDaemonFileOutputStream *file;
- AsyncIterator *iterator;
WriteOperation *op;
file = G_DAEMON_FILE_OUTPUT_STREAM (stream);
@@ -1260,8 +1260,6 @@
op->buffer = buffer;
op->buffer_size = count;
- iterator = g_new0 (AsyncIterator, 1);
-
run_async_state_machine (file,
(state_machine_iterator)iterate_write_state_machine,
op,
@@ -1349,7 +1347,6 @@
gpointer data)
{
GDaemonFileOutputStream *file;
- AsyncIterator *iterator;
CloseOperation *op;
file = G_DAEMON_FILE_OUTPUT_STREAM (stream);
@@ -1357,14 +1354,12 @@
op = g_new0 (CloseOperation, 1);
op->state = CLOSE_STATE_INIT;
- iterator = g_new0 (AsyncIterator, 1);
-
run_async_state_machine (file,
(state_machine_iterator)iterate_close_state_machine,
op, io_priority,
- (gpointer)callback, data,
+ (GAsyncReadyCallback)callback, data,
cancellable,
- (gpointer)async_close_done);
+ (AsyncIteratorDone)async_close_done);
}
static gboolean
Index: client/gdaemonvolumemonitor.c
===================================================================
--- client/gdaemonvolumemonitor.c (revisjon 1275)
+++ client/gdaemonvolumemonitor.c (arbeidskopi)
@@ -38,7 +38,7 @@
GList *mounts;
};
-G_DEFINE_DYNAMIC_TYPE (GDaemonVolumeMonitor, g_daemon_volume_monitor, G_TYPE_VOLUME_MONITOR);
+G_DEFINE_DYNAMIC_TYPE (GDaemonVolumeMonitor, g_daemon_volume_monitor, G_TYPE_VOLUME_MONITOR)
static GList *
get_mounts (GVolumeMonitor *volume_monitor)
Index: client/gdaemonfile.c
===================================================================
--- client/gdaemonfile.c (revisjon 1275)
+++ client/gdaemonfile.c (arbeidskopi)
@@ -629,7 +629,6 @@
{
GDaemonFile *daemon_file = G_DAEMON_FILE (file);
va_list var_args;
- GError *error;
AsyncPathCall *data;
data = g_new0 (AsyncPathCall, 1);
@@ -646,8 +645,6 @@
data->callback_data = callback_data;
data->notify = notify;
- error = NULL;
-
if (first_arg_type != 0)
{
data->args = dbus_message_new (DBUS_MESSAGE_TYPE_METHOD_CALL);
@@ -723,13 +720,11 @@
GError **error)
{
DBusMessage *reply;
- dbus_uint32_t flags_dbus;
DBusMessageIter iter;
GFileInfo *info;
if (attributes == NULL)
attributes = "";
- flags_dbus = flags;
reply = do_sync_path_call (file,
G_VFS_DBUS_MOUNT_OP_QUERY_INFO,
NULL, NULL,
@@ -1615,11 +1610,8 @@
GCancellable *cancellable,
GError **error)
{
- GDaemonFile *daemon_file;
DBusMessage *reply;
- daemon_file = G_DAEMON_FILE (file);
-
reply = do_sync_path_call (file,
G_VFS_DBUS_MOUNT_OP_DELETE,
NULL, NULL,
@@ -1637,11 +1629,8 @@
GCancellable *cancellable,
GError **error)
{
- GDaemonFile *daemon_file;
DBusMessage *reply;
- daemon_file = G_DAEMON_FILE (file);
-
reply = do_sync_path_call (file,
G_VFS_DBUS_MOUNT_OP_TRASH,
NULL, NULL,
@@ -1659,11 +1648,8 @@
GCancellable *cancellable,
GError **error)
{
- GDaemonFile *daemon_file;
DBusMessage *reply;
- daemon_file = G_DAEMON_FILE (file);
-
reply = do_sync_path_call (file,
G_VFS_DBUS_MOUNT_OP_MAKE_DIRECTORY,
NULL, NULL,
@@ -1757,13 +1743,10 @@
GCancellable *cancellable,
GError **error)
{
- GDaemonFile *daemon_file;
DBusMessage *message, *reply;
DBusMessageIter iter;
dbus_uint32_t flags_dbus;
- daemon_file = G_DAEMON_FILE (file);
-
message = create_empty_message (file, G_VFS_DBUS_MOUNT_OP_SET_ATTRIBUTE, NULL, error);
if (!message)
return FALSE;
@@ -1828,7 +1811,7 @@
gpointer progress_callback_data,
GError **error)
{
- GDaemonFile *daemon_source, *daemon_dest;
+ GDaemonFile *daemon_source;
DBusMessage *reply;
char *local_path;
char *obj_path, *dbus_obj_path;
@@ -1841,7 +1824,6 @@
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "%s", "Move not supported");
return FALSE;
}
- daemon_dest = G_DAEMON_FILE (destination);
if (G_IS_DAEMON_FILE (source))
{
@@ -1920,7 +1902,6 @@
gpointer progress_callback_data,
GError **error)
{
- GDaemonFile *daemon_source, *daemon_dest;
DBusMessage *reply;
char *obj_path, *dbus_obj_path;
dbus_uint32_t flags_dbus;
@@ -1934,9 +1915,6 @@
return FALSE;
}
- daemon_source = G_DAEMON_FILE (source);
- daemon_dest = G_DAEMON_FILE (destination);
-
if (progress_callback)
{
obj_path = g_strdup_printf ("/org/gtk/vfs/callback/%p", &obj_path);
Index: client/gdaemonfileenumerator.c
===================================================================
--- client/gdaemonfileenumerator.c (revisjon 1275)
+++ client/gdaemonfileenumerator.c (arbeidskopi)
@@ -51,7 +51,7 @@
};
-G_DEFINE_TYPE (GDaemonFileEnumerator, g_daemon_file_enumerator, G_TYPE_FILE_ENUMERATOR);
+G_DEFINE_TYPE (GDaemonFileEnumerator, g_daemon_file_enumerator, G_TYPE_FILE_ENUMERATOR)
static GFileInfo * g_daemon_file_enumerator_next_file (GFileEnumerator *enumerator,
GCancellable *cancellable,
Index: client/gvfsfusedaemon.c
===================================================================
--- client/gvfsfusedaemon.c (revisjon 1275)
+++ client/gvfsfusedaemon.c (arbeidskopi)
@@ -1315,7 +1315,7 @@
debug_print ("vfs_flush: %s\n", path);
return 0;
-};
+}
static gint
vfs_opendir (const gchar *path, struct fuse_file_info *fi)
Index: client/gdaemonvfs.c
===================================================================
--- client/gdaemonvfs.c (revisjon 1275)
+++ client/gdaemonvfs.c (arbeidskopi)
@@ -59,7 +59,7 @@
GVfsClass parent_class;
};
-G_DEFINE_DYNAMIC_TYPE (GDaemonVfs, g_daemon_vfs, G_TYPE_VFS);
+G_DEFINE_DYNAMIC_TYPE (GDaemonVfs, g_daemon_vfs, G_TYPE_VFS)
static GDaemonVfs *the_vfs = NULL;
@@ -558,11 +558,9 @@
void
_g_daemon_vfs_invalidate_dbus_id (const char *dbus_id)
{
- GMountInfo *info;
GList *l, *next;
G_LOCK (mount_cache);
- info = NULL;
for (l = the_vfs->mount_cache; l != NULL; l = next)
{
GMountInfo *mount_info = l->data;
Index: client/gvfsurimapper.c
===================================================================
--- client/gvfsurimapper.c (revisjon 1275)
+++ client/gvfsurimapper.c (arbeidskopi)
@@ -25,7 +25,7 @@
#include <gmodule.h>
#include "gvfsurimapper.h"
-G_DEFINE_DYNAMIC_TYPE (GVfsUriMapper, g_vfs_uri_mapper, G_TYPE_OBJECT);
+G_DEFINE_DYNAMIC_TYPE (GVfsUriMapper, g_vfs_uri_mapper, G_TYPE_OBJECT)
void
g_vfs_uri_mapper_register (GIOModule *module)
Index: client/sftpuri.c
===================================================================
--- client/sftpuri.c (revisjon 1275)
+++ client/sftpuri.c (arbeidskopi)
@@ -147,10 +147,8 @@
static void
g_vfs_uri_mapper_sftp_class_init (GVfsUriMapperSftpClass *class)
{
- GObjectClass *object_class;
GVfsUriMapperClass *mapper_class;
- object_class = (GObjectClass *) class;
mapper_class = G_VFS_URI_MAPPER_CLASS (class);
mapper_class->get_handled_schemes = sftp_get_handled_schemes;
mapper_class->from_uri = sftp_from_uri;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]