summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--client/gdaemonfile.c24
-rw-r--r--client/gdaemonfileenumerator.c2
-rw-r--r--client/gdaemonfileinputstream.c13
-rw-r--r--client/gdaemonfileoutputstream.c13
-rw-r--r--client/gdaemonvfs.c4
-rw-r--r--client/gdaemonvolumemonitor.c2
-rw-r--r--client/gvfsfusedaemon.c2
-rw-r--r--client/gvfsurimapper.c2
-rw-r--r--client/httpuri.c23
-rw-r--r--client/sftpuri.c2
-rw-r--r--client/smburi.c2
-rw-r--r--common/gdbusutils.c3
-rw-r--r--common/gmountsource.c5
-rw-r--r--common/gmounttracker.c2
-rw-r--r--common/gvfsdaemonprotocol.c2
-rw-r--r--daemon/dbus-gmain.c2
-rw-r--r--daemon/gvfsbackendburn.c4
-rw-r--r--daemon/gvfsbackendcdda.c2
-rw-r--r--daemon/gvfsbackendcomputer.c2
-rw-r--r--daemon/gvfsbackenddav.c20
-rw-r--r--daemon/gvfsbackendftp.c11
-rw-r--r--daemon/gvfsbackendhttp.c12
-rw-r--r--daemon/gvfsbackendlocaltest.c6
-rw-r--r--daemon/gvfsbackendsftp.c14
-rw-r--r--daemon/gvfsbackendsmb.c2
-rw-r--r--daemon/gvfsbackendsmbbrowse.c6
-rw-r--r--daemon/gvfsbackendtest.c10
-rw-r--r--daemon/gvfsbackendtrash.c13
-rw-r--r--daemon/gvfschannel.c1
-rw-r--r--daemon/gvfsdaemon.c8
-rw-r--r--daemon/gvfsjob.c2
-rw-r--r--daemon/gvfsjobcloseread.c2
-rw-r--r--daemon/gvfsjobclosewrite.c2
-rw-r--r--daemon/gvfsjobcopy.c2
-rw-r--r--daemon/gvfsjobcreatemonitor.c2
-rw-r--r--daemon/gvfsjobdbus.c2
-rw-r--r--daemon/gvfsjobdelete.c2
-rw-r--r--daemon/gvfsjobenumerate.c2
-rw-r--r--daemon/gvfsjobmakedirectory.c2
-rw-r--r--daemon/gvfsjobmakesymlink.c2
-rw-r--r--daemon/gvfsjobmount.c2
-rw-r--r--daemon/gvfsjobmountmountable.c2
-rw-r--r--daemon/gvfsjobmove.c2
-rw-r--r--daemon/gvfsjobopenforread.c11
-rw-r--r--daemon/gvfsjobopenforwrite.c13
-rw-r--r--daemon/gvfsjobqueryattributes.c2
-rw-r--r--daemon/gvfsjobqueryfsinfo.c2
-rw-r--r--daemon/gvfsjobqueryinfo.c2
-rw-r--r--daemon/gvfsjobread.c4
-rw-r--r--daemon/gvfsjobseekread.c2
-rw-r--r--daemon/gvfsjobseekwrite.c2
-rw-r--r--daemon/gvfsjobsetattribute.c2
-rw-r--r--daemon/gvfsjobsetdisplayname.c2
-rw-r--r--daemon/gvfsjobtrash.c2
-rw-r--r--daemon/gvfsjobunmount.c6
-rw-r--r--daemon/gvfsjobunmountmountable.c2
-rw-r--r--daemon/gvfsjobupload.c2
-rw-r--r--daemon/gvfsjobwrite.c2
-rw-r--r--daemon/gvfsmonitor.c1
-rw-r--r--daemon/gvfsreadchannel.c7
-rw-r--r--daemon/gvfswritechannel.c7
-rw-r--r--daemon/main.c10
-rw-r--r--daemon/soup-input-stream.c10
-rw-r--r--daemon/soup-output-stream.c4
-rw-r--r--gconf/gapplookupgconf.c7
-rw-r--r--hal/ghalmount.c10
-rw-r--r--hal/ghalvolume.c4
-rw-r--r--hal/ghalvolumemonitor.c4
-rw-r--r--hal/hal-device.c2
-rw-r--r--hal/hal-pool.c2
-rw-r--r--programs/gvfs-copy.c2
-rw-r--r--programs/gvfs-mount.c3
-rw-r--r--programs/gvfs-move.c2
-rw-r--r--test/benchmark-posix-big-files.c5
75 files changed, 138 insertions, 248 deletions
diff --git a/ChangeLog b/ChangeLog
index 5aa2597e..59bff1d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-02-19 Alexander Larsson <alexl@redhat.com>
+
+ * lots of *.c files:
+ Code cleanup from Kjartan:
+ Removes unused code/variables.
+ Uses right printf types
+ Uses non-deprecated dbus calls.
+ Removes spurious ; and ,
+ deleted extra checks for NULL for g_free
+
2008-02-18 Alexander Larsson <alexl@redhat.com>
* hal/ghalmount.c:
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index 76ef0fa4..a213a6cb 100644
--- a/client/gdaemonfile.c
+++ b/client/gdaemonfile.c
@@ -629,7 +629,6 @@ do_async_path_call (GFile *file,
{
GDaemonFile *daemon_file = G_DAEMON_FILE (file);
va_list var_args;
- GError *error;
AsyncPathCall *data;
data = g_new0 (AsyncPathCall, 1);
@@ -646,8 +645,6 @@ do_async_path_call (GFile *file,
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);
@@ -743,7 +740,7 @@ g_daemon_file_query_info (GFile *file,
NULL, NULL,
cancellable, error,
DBUS_TYPE_STRING, &attributes,
- DBUS_TYPE_UINT32, &flags,
+ DBUS_TYPE_UINT32, &flags_dbus,
DBUS_TYPE_STRING, &uri,
0);
@@ -1633,11 +1630,8 @@ g_daemon_file_delete (GFile *file,
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,
@@ -1655,11 +1649,8 @@ g_daemon_file_trash (GFile *file,
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,
@@ -1677,11 +1668,8 @@ g_daemon_file_make_directory (GFile *file,
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,
@@ -1775,13 +1763,10 @@ g_daemon_file_set_attribute (GFile *file,
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;
@@ -1846,7 +1831,7 @@ g_daemon_file_copy (GFile *source,
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;
@@ -1859,7 +1844,6 @@ g_daemon_file_copy (GFile *source,
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))
{
@@ -1938,7 +1922,6 @@ g_daemon_file_move (GFile *source,
gpointer progress_callback_data,
GError **error)
{
- GDaemonFile *daemon_source, *daemon_dest;
DBusMessage *reply;
char *obj_path, *dbus_obj_path;
dbus_uint32_t flags_dbus;
@@ -1952,9 +1935,6 @@ g_daemon_file_move (GFile *source,
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);
diff --git a/client/gdaemonfileenumerator.c b/client/gdaemonfileenumerator.c
index cbaab2da..1fc8209e 100644
--- a/client/gdaemonfileenumerator.c
+++ b/client/gdaemonfileenumerator.c
@@ -51,7 +51,7 @@ struct _GDaemonFileEnumerator
};
-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,
diff --git a/client/gdaemonfileinputstream.c b/client/gdaemonfileinputstream.c
index 18ce96b3..b89b76ce 100644
--- a/client/gdaemonfileinputstream.c
+++ b/client/gdaemonfileinputstream.c
@@ -743,10 +743,11 @@ g_daemon_file_input_stream_skip (GInputStream *stream,
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 @@ g_daemon_file_input_stream_query_info (GFileInputStream *stream,
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 @@ g_daemon_file_input_stream_read_async (GInputStream *stream,
gpointer user_data)
{
GDaemonFileInputStream *file;
- AsyncIterator *iterator;
ReadOperation *op;
file = G_DAEMON_FILE_INPUT_STREAM (stream);
@@ -1516,8 +1512,6 @@ g_daemon_file_input_stream_read_async (GInputStream *stream,
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 @@ g_daemon_file_input_stream_close_async (GInputStream *stream,
gpointer data)
{
GDaemonFileInputStream *file;
- AsyncIterator *iterator;
CloseOperation *op;
file = G_DAEMON_FILE_INPUT_STREAM (stream);
@@ -1636,8 +1629,6 @@ g_daemon_file_input_stream_close_async (GInputStream *stream,
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,
diff --git a/client/gdaemonfileoutputstream.c b/client/gdaemonfileoutputstream.c
index 257c65c0..b816f136 100644
--- a/client/gdaemonfileoutputstream.c
+++ b/client/gdaemonfileoutputstream.c
@@ -983,10 +983,11 @@ g_daemon_file_output_stream_query_info (GFileOutputStream *stream,
GCancellable *cancellable,
GError **error)
{
+#if 0
GDaemonFileOutputStream *file;
file = G_DAEMON_FILE_OUTPUT_STREAM (stream);
-
+#endif
return NULL;
}
@@ -1246,7 +1247,6 @@ g_daemon_file_output_stream_write_async (GOutputStream *stream,
gpointer data)
{
GDaemonFileOutputStream *file;
- AsyncIterator *iterator;
WriteOperation *op;
file = G_DAEMON_FILE_OUTPUT_STREAM (stream);
@@ -1260,8 +1260,6 @@ g_daemon_file_output_stream_write_async (GOutputStream *stream,
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 @@ g_daemon_file_output_stream_close_async (GOutputStream *stream,
gpointer data)
{
GDaemonFileOutputStream *file;
- AsyncIterator *iterator;
CloseOperation *op;
file = G_DAEMON_FILE_OUTPUT_STREAM (stream);
@@ -1357,14 +1354,12 @@ g_daemon_file_output_stream_close_async (GOutputStream *stream,
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
diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c
index d92cb005..9379ef86 100644
--- a/client/gdaemonvfs.c
+++ b/client/gdaemonvfs.c
@@ -59,7 +59,7 @@ struct _GDaemonVfsClass
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 @@ lookup_mount_info_in_cache (GMountSpec *spec,
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;
diff --git a/client/gdaemonvolumemonitor.c b/client/gdaemonvolumemonitor.c
index 131b52ad..0efd0464 100644
--- a/client/gdaemonvolumemonitor.c
+++ b/client/gdaemonvolumemonitor.c
@@ -38,7 +38,7 @@ struct _GDaemonVolumeMonitor {
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)
diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c
index 71d9d7bf..ef3f69c5 100644
--- a/client/gvfsfusedaemon.c
+++ b/client/gvfsfusedaemon.c
@@ -1315,7 +1315,7 @@ vfs_flush (const gchar *path, struct fuse_file_info *fi)
debug_print ("vfs_flush: %s\n", path);
return 0;
-};
+}
static gint
vfs_opendir (const gchar *path, struct fuse_file_info *fi)
diff --git a/client/gvfsurimapper.c b/client/gvfsurimapper.c
index 9e99b2c8..9c98347a 100644
--- a/client/gvfsurimapper.c
+++ b/client/gvfsurimapper.c
@@ -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)
diff --git a/client/httpuri.c b/client/httpuri.c
index 1ca025da..600d2d72 100644
--- a/client/httpuri.c
+++ b/client/httpuri.c
@@ -214,10 +214,10 @@ http_to_uri (GVfsUriMapper *mapper,
}
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 @@ http_to_uri (GVfsUriMapper *mapper,
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 @@ g_vfs_uri_mapper_http_class_finalize (GVfsUriMapperHttpClass *klass)
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;
diff --git a/client/sftpuri.c b/client/sftpuri.c
index 65ed6cbd..d3d305c6 100644
--- a/client/sftpuri.c
+++ b/client/sftpuri.c
@@ -147,10 +147,8 @@ g_vfs_uri_mapper_sftp_class_finalize (GVfsUriMapperSftpClass *klass)
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;
diff --git a/client/smburi.c b/client/smburi.c
index f2f3ea3a..c1a10c8a 100644
--- a/client/smburi.c
+++ b/client/smburi.c
@@ -269,10 +269,8 @@ g_vfs_uri_mapper_smb_class_finalize (GVfsUriMapperSmbClass *klass)
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;
diff --git a/common/gdbusutils.c b/common/gdbusutils.c
index c9e17953..3ad02597 100644
--- a/common/gdbusutils.c
+++ b/common/gdbusutils.c
@@ -33,7 +33,6 @@ void
_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 @@ dbus_source_add_watch (DBusSource *dbus_source,
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,
diff --git a/common/gmountsource.c b/common/gmountsource.c
index 0471e2e1..864c85f7 100644
--- a/common/gmountsource.c
+++ b/common/gmountsource.c
@@ -35,7 +35,7 @@ struct _GMountSource
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)
@@ -316,11 +316,8 @@ ask_password_reply_sync (GObject *source_object,
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);
diff --git a/common/gmounttracker.c b/common/gmounttracker.c
index b84684ab..4e387013 100644
--- a/common/gmounttracker.c
+++ b/common/gmounttracker.c
@@ -54,7 +54,7 @@ struct _GMountTracker
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,
diff --git a/common/gvfsdaemonprotocol.c b/common/gvfsdaemonprotocol.c
index e09ecb9d..2715dce0 100644
--- a/common/gvfsdaemonprotocol.c
+++ b/common/gvfsdaemonprotocol.c
@@ -226,7 +226,7 @@ _g_dbus_type_from_file_attribute_type (GFileAttributeType type)
break;
default:
dbus_type = NULL;
- g_warning ("Invalid attribute type %d, ignoring\n", type);
+ g_warning ("Invalid attribute type %u, ignoring\n", type);
break;
}
diff --git a/daemon/dbus-gmain.c b/daemon/dbus-gmain.c
index d72a0621..52ca6412 100644
--- a/daemon/dbus-gmain.c
+++ b/daemon/dbus-gmain.c
@@ -291,7 +291,7 @@ connection_setup_add_watch (ConnectionSetup *cs,
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,
diff --git a/daemon/gvfsbackendburn.c b/daemon/gvfsbackendburn.c
index 706d807a..296f6b17 100644
--- a/daemon/gvfsbackendburn.c
+++ b/daemon/gvfsbackendburn.c
@@ -94,7 +94,7 @@ struct _GVfsBackendBurn
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 @@ try_upload (GVfsBackend *backend,
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)
diff --git a/daemon/gvfsbackendcdda.c b/daemon/gvfsbackendcdda.c
index 41361901..29ea9dd8 100644
--- a/daemon/gvfsbackendcdda.c
+++ b/daemon/gvfsbackendcdda.c
@@ -91,7 +91,7 @@ struct _GVfsBackendCdda
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)
diff --git a/daemon/gvfsbackendcomputer.c b/daemon/gvfsbackendcomputer.c
index 3a952185..d6c427b2 100644
--- a/daemon/gvfsbackendcomputer.c
+++ b/daemon/gvfsbackendcomputer.c
@@ -89,7 +89,7 @@ struct _GVfsBackendComputer
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)
diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c
index 5c5488ad..69dc95ad 100644
--- a/daemon/gvfsbackenddav.c
+++ b/daemon/gvfsbackenddav.c
@@ -66,15 +66,11 @@ struct _GVfsBackendDav
};
-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);
}
@@ -192,7 +188,6 @@ node_get_content (xmlNodePtr node)
default:
return NULL;
}
- return NULL;
}
typedef struct _xmlNodeIter {
@@ -863,9 +858,9 @@ discover_mount_root_ready (SoupSession *session,
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;
}
@@ -923,7 +918,6 @@ try_mount (GVfsBackend *backend,
GMountSource *mount_source,
gboolean is_automount)
{
- GVfsBackendDav *op_backend;
MountOpData *data;
SoupSession *session;
SoupMessage *msg;
@@ -936,8 +930,6 @@ try_mount (GVfsBackend *backend,
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");
@@ -1389,10 +1381,8 @@ try_write (GVfsBackend *backend,
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,
@@ -1441,10 +1431,8 @@ try_close_write (GVfsBackend *backend,
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,
diff --git a/daemon/gvfsbackendftp.c b/daemon/gvfsbackendftp.c
index c2a02199..8e1cbd46 100644
--- a/daemon/gvfsbackendftp.c
+++ b/daemon/gvfsbackendftp.c
@@ -58,15 +58,11 @@ struct _GVfsBackendFtp
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 @@ try_mount (GVfsBackend *backend,
#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 @@ try_mount (GVfsBackend *backend,
_("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 */
diff --git a/daemon/gvfsbackendhttp.c b/daemon/gvfsbackendhttp.c
index 4eaa326b..824c5531 100644
--- a/daemon/gvfsbackendhttp.c
+++ b/daemon/gvfsbackendhttp.c
@@ -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 @@ message_new_from_filename (GVfsBackend *backend,
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 @@ try_read (GVfsBackend *backend,
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 @@ try_seek_on_read (GVfsBackend *backend,
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 @@ try_close_read (GVfsBackend *backend,
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 @@ try_close_read (GVfsBackend *backend,
G_VFS_JOB (job)->cancellable,
close_read_ready,
job);
-
return TRUE;
}
diff --git a/daemon/gvfsbackendlocaltest.c b/daemon/gvfsbackendlocaltest.c
index 6ceaea3d..ac30adcd 100644
--- a/daemon/gvfsbackendlocaltest.c
+++ b/daemon/gvfsbackendlocaltest.c
@@ -174,7 +174,7 @@ get_g_file_info_from_local (const char *filename, GFile *file,
*
*/
-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 @@ do_make_symlink (GVfsBackend *backend,
}
}
-
+#if 0
static void
do_copy (GVfsBackend *backend,
GVfsJobCopy *job,
@@ -636,7 +636,7 @@ do_copy (GVfsBackend *backend,
g_print (" (EE) try_copy: file == NULL \n");
}
}
-
+#endif
static void
do_move (GVfsBackend *backend,
diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c
index e6360db1..cbd4ec18 100644
--- a/daemon/gvfsbackendsftp.c
+++ b/daemon/gvfsbackendsftp.c
@@ -144,7 +144,7 @@ static void parse_attributes (GVfsBackendSftp *backend,
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)
@@ -814,7 +814,7 @@ read_reply_async_got_data (GObject *source_object,
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);
@@ -1626,16 +1626,16 @@ open_for_read_reply (GVfsBackendSftp *backend,
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;
@@ -2817,7 +2817,6 @@ read_dir_reply (GVfsBackendSftp *backend,
GVfsJobEnumerate *enum_job;
guint32 count;
int i;
- GList *infos;
guint32 id;
GDataOutputStream *command;
ReadDirData *data;
@@ -2844,7 +2843,6 @@ read_dir_reply (GVfsBackendSftp *backend,
return;
}
- infos = NULL;
count = g_data_input_stream_read_uint32 (reply, NULL, NULL);
for (i = 0; i < count; i++)
{
diff --git a/daemon/gvfsbackendsmb.c b/daemon/gvfsbackendsmb.c
index d11d76d4..7af1c2a8 100644
--- a/daemon/gvfsbackendsmb.c
+++ b/daemon/gvfsbackendsmb.c
@@ -77,7 +77,7 @@ struct _GVfsBackendSmb
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)
diff --git a/daemon/gvfsbackendsmbbrowse.c b/daemon/gvfsbackendsmbbrowse.c
index 67467457..c602cd0c 100644
--- a/daemon/gvfsbackendsmbbrowse.c
+++ b/daemon/gvfsbackendsmbbrowse.c
@@ -77,7 +77,7 @@ typedef struct {
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 @@ update_cache (GVfsBackendSmbBrowse *backend)
{
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 @@ run_mount_mountable (GVfsBackendSmbBrowse *backend,
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);
diff --git a/daemon/gvfsbackendtest.c b/daemon/gvfsbackendtest.c
index 5ca94be3..b0fb28e4 100644
--- a/daemon/gvfsbackendtest.c
+++ b/daemon/gvfsbackendtest.c
@@ -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 @@ try_read (GVfsBackend *backend,
{
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 @@ do_seek_on_read (GVfsBackend *backend,
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)
{
diff --git a/daemon/gvfsbackendtrash.c b/daemon/gvfsbackendtrash.c
index ade0d839..6a26f52e 100644
--- a/daemon/gvfsbackendtrash.c
+++ b/daemon/gvfsbackendtrash.c
@@ -113,7 +113,7 @@ struct _GVfsBackendTrash
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);
@@ -253,7 +253,7 @@ get_top_dir_for_trash_dir (const char *trash_dir)
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 @@ get_top_dir_for_trash_dir (const char *trash_dir)
}
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 @@ check_topdir (const char *topdir)
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 @@ check_topdir (const char *topdir)
}
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);
@@ -1118,7 +1118,6 @@ do_enumerate (GVfsBackend *backend,
GFile *file;
GFileEnumerator *enumerator;
GFileInfo *info;
- const char *name;
char *dir;
GError *error;
@@ -1142,8 +1141,6 @@ do_enumerate (GVfsBackend *backend,
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);
}
diff --git a/daemon/gvfschannel.c b/daemon/gvfschannel.c
index 28ad4b88..94b1667c 100644
--- a/daemon/gvfschannel.c
+++ b/daemon/gvfschannel.c
@@ -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>
diff --git a/daemon/gvfsdaemon.c b/daemon/gvfsdaemon.c
index 9d968239..2a84a3b5 100644
--- a/daemon/gvfsdaemon.c
+++ b/daemon/gvfsdaemon.c
@@ -98,7 +98,7 @@ static DBusHandlerResult peer_to_peer_filter_func (DBusConnection *conn,
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 @@ g_vfs_daemon_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
+#if 0
GVfsDaemon *daemon;
daemon = G_VFS_DAEMON (object);
-
+#endif
switch (prop_id)
{
default:
@@ -207,10 +208,11 @@ g_vfs_daemon_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
+#if 0
GVfsDaemon *daemon;
daemon = G_VFS_DAEMON (object);
-
+#endif
switch (prop_id)
{
default:
diff --git a/daemon/gvfsjob.c b/daemon/gvfsjob.c
index ad461a01..ee2c0cf4 100644
--- a/daemon/gvfsjob.c
+++ b/daemon/gvfsjob.c
@@ -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)
diff --git a/daemon/gvfsjobcloseread.c b/daemon/gvfsjobcloseread.c
index f34c2443..d064f45f 100644
--- a/daemon/gvfsjobcloseread.c
+++ b/daemon/gvfsjobcloseread.c
@@ -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);
diff --git a/daemon/gvfsjobclosewrite.c b/daemon/gvfsjobclosewrite.c
index 65fd5cc4..5eea80b8 100644
--- a/daemon/gvfsjobclosewrite.c
+++ b/daemon/gvfsjobclosewrite.c
@@ -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);
diff --git a/daemon/gvfsjobcopy.c b/daemon/gvfsjobcopy.c
index d1b73c82..c37701fd 100644
--- a/daemon/gvfsjobcopy.c
+++ b/daemon/gvfsjobcopy.c
@@ -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);
diff --git a/daemon/gvfsjobcreatemonitor.c b/daemon/gvfsjobcreatemonitor.c
index d3abf0d3..3c63d263 100644
--- a/daemon/gvfsjobcreatemonitor.c
+++ b/daemon/gvfsjobcreatemonitor.c
@@ -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);
diff --git a/daemon/gvfsjobdbus.c b/daemon/gvfsjobdbus.c
index ef6fee8a..8c75fce3 100644
--- a/daemon/gvfsjobdbus.c
+++ b/daemon/gvfsjobdbus.c
@@ -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)
diff --git a/daemon/gvfsjobdelete.c b/daemon/gvfsjobdelete.c
index adf802ff..b65ec299 100644
--- a/daemon/gvfsjobdelete.c
+++ b/daemon/gvfsjobdelete.c
@@ -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);
diff --git a/daemon/gvfsjobenumerate.c b/daemon/gvfsjobenumerate.c
index 928b07b6..e2ff65c1 100644
--- a/daemon/gvfsjobenumerate.c
+++ b/daemon/gvfsjobenumerate.c
@@ -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);
diff --git a/daemon/gvfsjobmakedirectory.c b/daemon/gvfsjobmakedirectory.c
index 121a4c51..2e16b12d 100644
--- a/daemon/gvfsjobmakedirectory.c
+++ b/daemon/gvfsjobmakedirectory.c
@@ -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);
diff --git a/daemon/gvfsjobmakesymlink.c b/daemon/gvfsjobmakesymlink.c
index 5524f171..898010fc 100644
--- a/daemon/gvfsjobmakesymlink.c
+++ b/daemon/gvfsjobmakesymlink.c
@@ -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);
diff --git a/daemon/gvfsjobmount.c b/daemon/gvfsjobmount.c
index cd80819f..300b8478 100644
--- a/daemon/gvfsjobmount.c
+++ b/daemon/gvfsjobmount.c
@@ -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);
diff --git a/daemon/gvfsjobmountmountable.c b/daemon/gvfsjobmountmountable.c
index a83c04a3..4397bc1f 100644
--- a/daemon/gvfsjobmountmountable.c
+++ b/daemon/gvfsjobmountmountable.c
@@ -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);
diff --git a/daemon/gvfsjobmove.c b/daemon/gvfsjobmove.c
index 3b5cbd63..222be9c9 100644
--- a/daemon/gvfsjobmove.c
+++ b/daemon/gvfsjobmove.c
@@ -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);
diff --git a/daemon/gvfsjobopenforread.c b/daemon/gvfsjobopenforread.c
index c1b1b36c..0775db46 100644
--- a/daemon/gvfsjobopenforread.c
+++ b/daemon/gvfsjobopenforread.c
@@ -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 @@ create_reply (GVfsJob *job,
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 @@ create_reply (GVfsJob *job,
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;
diff --git a/daemon/gvfsjobopenforwrite.c b/daemon/gvfsjobopenforwrite.c
index 23adfae3..21e492eb 100644
--- a/daemon/gvfsjobopenforwrite.c
+++ b/daemon/gvfsjobopenforwrite.c
@@ -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 @@ create_reply (GVfsJob *job,
GError *error;
int remote_fd;
int fd_id;
- gboolean res;
dbus_bool_t can_seek;
guint64 initial_offset;
@@ -292,11 +291,11 @@ create_reply (GVfsJob *job,
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;
diff --git a/daemon/gvfsjobqueryattributes.c b/daemon/gvfsjobqueryattributes.c
index 76bdab7d..aeeeafe9 100644
--- a/daemon/gvfsjobqueryattributes.c
+++ b/daemon/gvfsjobqueryattributes.c
@@ -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);
diff --git a/daemon/gvfsjobqueryfsinfo.c b/daemon/gvfsjobqueryfsinfo.c
index 6090d070..a5d369c4 100644
--- a/daemon/gvfsjobqueryfsinfo.c
+++ b/daemon/gvfsjobqueryfsinfo.c
@@ -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);
diff --git a/daemon/gvfsjobqueryinfo.c b/daemon/gvfsjobqueryinfo.c
index 42b0c07c..78bf1607 100644
--- a/daemon/gvfsjobqueryinfo.c
+++ b/daemon/gvfsjobqueryinfo.c
@@ -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);
diff --git a/daemon/gvfsjobread.c b/daemon/gvfsjobread.c
index 5742c7a2..1d542bd6 100644
--- a/daemon/gvfsjobread.c
+++ b/daemon/gvfsjobread.c
@@ -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 @@ static void
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);
diff --git a/daemon/gvfsjobseekread.c b/daemon/gvfsjobseekread.c
index ddcba7b3..4813752b 100644
--- a/daemon/gvfsjobseekread.c
+++ b/daemon/gvfsjobseekread.c
@@ -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);
diff --git a/daemon/gvfsjobseekwrite.c b/daemon/gvfsjobseekwrite.c
index 9ece32c8..0ceda867 100644
--- a/daemon/gvfsjobseekwrite.c
+++ b/daemon/gvfsjobseekwrite.c
@@ -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);
diff --git a/daemon/gvfsjobsetattribute.c b/daemon/gvfsjobsetattribute.c
index ffa27aa0..0b88d81f 100644
--- a/daemon/gvfsjobsetattribute.c
+++ b/daemon/gvfsjobsetattribute.c
@@ -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);
diff --git a/daemon/gvfsjobsetdisplayname.c b/daemon/gvfsjobsetdisplayname.c
index 1bd16c4b..e3dd22db 100644
--- a/daemon/gvfsjobsetdisplayname.c
+++ b/daemon/gvfsjobsetdisplayname.c
@@ -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);
diff --git a/daemon/gvfsjobtrash.c b/daemon/gvfsjobtrash.c
index 6d59a883..4869ee3d 100644
--- a/daemon/gvfsjobtrash.c
+++ b/daemon/gvfsjobtrash.c
@@ -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);
diff --git a/daemon/gvfsjobunmount.c b/daemon/gvfsjobunmount.c
index 4d471bb7..6493856f 100644
--- a/daemon/gvfsjobunmount.c
+++ b/daemon/gvfsjobunmount.c
@@ -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 DBusMessage *create_reply (GVfsJob *job,
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);
}
diff --git a/daemon/gvfsjobunmountmountable.c b/daemon/gvfsjobunmountmountable.c
index 8cd0e766..cb9eb22e 100644
--- a/daemon/gvfsjobunmountmountable.c
+++ b/daemon/gvfsjobunmountmountable.c
@@ -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);
diff --git a/daemon/gvfsjobupload.c b/daemon/gvfsjobupload.c
index 53868615..642643c2 100644
--- a/daemon/gvfsjobupload.c
+++ b/daemon/gvfsjobupload.c
@@ -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);
diff --git a/daemon/gvfsjobwrite.c b/daemon/gvfsjobwrite.c
index ccbec702..09ca5ad1 100644
--- a/daemon/gvfsjobwrite.c
+++ b/daemon/gvfsjobwrite.c
@@ -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);
diff --git a/daemon/gvfsmonitor.c b/daemon/gvfsmonitor.c
index 0407cb29..325b4da0 100644
--- a/daemon/gvfsmonitor.c
+++ b/daemon/gvfsmonitor.c
@@ -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>
diff --git a/daemon/gvfsreadchannel.c b/daemon/gvfsreadchannel.c
index f653d5d3..04783bd5 100644
--- a/daemon/gvfsreadchannel.c
+++ b/daemon/gvfsreadchannel.c
@@ -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 GVfsJob *read_channel_readahead (GVfsChannel *channel,
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 @@ read_channel_handle_request (GVfsChannel *channel,
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;
}
diff --git a/daemon/gvfswritechannel.c b/daemon/gvfswritechannel.c
index b0bf69e1..9500e08e 100644
--- a/daemon/gvfswritechannel.c
+++ b/daemon/gvfswritechannel.c
@@ -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 GVfsJob *write_channel_handle_request (GVfsChannel *channel,
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 @@ write_channel_handle_request (GVfsChannel *channel,
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;
}
diff --git a/daemon/main.c b/daemon/main.c
index c48fbd74..ebfe9d19 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -97,19 +97,19 @@ main (int argc, char *argv[])
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,
diff --git a/daemon/soup-input-stream.c b/daemon/soup-input-stream.c
index c02018f6..83f7712b 100644
--- a/daemon/soup-input-stream.c
+++ b/daemon/soup-input-stream.c
@@ -33,7 +33,7 @@ static void soup_input_stream_seekable_iface_init (GSeekableIface *seekable_ifac
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,9 +121,7 @@ soup_input_stream_finalize (GObject *object)
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);
-
- if (priv->leftover_buffer)
- g_free (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);
@@ -459,11 +457,9 @@ soup_input_stream_send (GInputStream *stream,
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;
@@ -646,11 +642,9 @@ soup_input_stream_send_async (GInputStream *stream,
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))
{
diff --git a/daemon/soup-output-stream.c b/daemon/soup-output-stream.c
index 2d53e944..29e41590 100644
--- a/daemon/soup-output-stream.c
+++ b/daemon/soup-output-stream.c
@@ -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 *);
@@ -266,7 +266,7 @@ soup_output_stream_write (GOutputStream *stream,
return count;
}
-static gboolean
+static int
soup_output_stream_close (GOutputStream *stream,
GCancellable *cancellable,
GError **error)
diff --git a/gconf/gapplookupgconf.c b/gconf/gapplookupgconf.c
index 30b2d636..5d562b5d 100644
--- a/gconf/gapplookupgconf.c
+++ b/gconf/gapplookupgconf.c
@@ -56,10 +56,6 @@ G_DEFINE_DYNAMIC_TYPE_EXTENDED (GAppLookupGConf, g_app_lookup_gconf, G_TYPE_OBJE
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 @@ g_app_lookup_gconf_constructor (GType type,
GObjectConstructParam *construct_properties)
{
GObject *object;
- GAppLookupGConf *lookup;
GAppLookupGConfClass *klass;
GObjectClass *parent_class;
@@ -83,8 +78,6 @@ g_app_lookup_gconf_constructor (GType type,
n_construct_properties,
construct_properties);
- lookup = G_APP_LOOKUP_GCONF (object);
-
return object;
}
diff --git a/hal/ghalmount.c b/hal/ghalmount.c
index 1a5d835e..60e834b6 100644
--- a/hal/ghalmount.c
+++ b/hal/ghalmount.c
@@ -138,7 +138,7 @@ g_hal_mount_init (GHalMount *hal_mount)
{
}
-const static struct {
+static const struct {
const char *disc_type;
const char *icon_name;
char *ui_name;
@@ -161,7 +161,7 @@ const static struct {
{"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 *
@@ -589,8 +589,7 @@ g_hal_mount_new_for_hal_device (GVolumeMonitor *volume_monitor,
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);
@@ -1152,8 +1151,7 @@ clear_find_file_insensitive_state (InsensitiveFileSearchData *data)
{
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)
diff --git a/hal/ghalvolume.c b/hal/ghalvolume.c
index 4553d1db..a17f21b2 100644
--- a/hal/ghalvolume.c
+++ b/hal/ghalvolume.c
@@ -129,7 +129,7 @@ g_hal_volume_init (GHalVolume *hal_volume)
{
}
-const static struct {
+static const struct {
const char *disc_type;
const char *icon_name;
char *ui_name;
@@ -152,7 +152,7 @@ const static struct {
{"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 *
diff --git a/hal/ghalvolumemonitor.c b/hal/ghalvolumemonitor.c
index f5c26cbf..dc8316e7 100644
--- a/hal/ghalvolumemonitor.c
+++ b/hal/ghalvolumemonitor.c
@@ -54,7 +54,7 @@ struct _GHalVolumeMonitor {
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_discs (GHalVolumeMonitor *monitor);
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)
diff --git a/hal/hal-device.c b/hal/hal-device.c
index ad7f2653..476ce0a6 100644
--- a/hal/hal-device.c
+++ b/hal/hal-device.c
@@ -40,7 +40,7 @@ enum {
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)
diff --git a/hal/hal-pool.c b/hal/hal-pool.c
index 706cae4b..5af0900a 100644
--- a/hal/hal-pool.c
+++ b/hal/hal-pool.c
@@ -49,7 +49,7 @@ struct _HalPoolPrivate
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)
diff --git a/programs/gvfs-copy.c b/programs/gvfs-copy.c
index fd23ebcc..ae527be2 100644
--- a/programs/gvfs-copy.c
+++ b/programs/gvfs-copy.c
@@ -67,7 +67,7 @@ show_progress (goffset current_num_bytes,
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);
}
diff --git a/programs/gvfs-mount.c b/programs/gvfs-mount.c
index a28b626f..1865186b 100644
--- a/programs/gvfs-mount.c
+++ b/programs/gvfs-mount.c
@@ -59,7 +59,6 @@ prompt_for (const char *prompt, const char *default_value, gboolean echo)
#ifdef HAVE_TERMIOS_H
struct termios term_attr;
int old_flags;
- int res;
gboolean restore_flags;
#endif
char data[256];
@@ -74,7 +73,7 @@ prompt_for (const char *prompt, const char *default_value, gboolean echo)
#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;
diff --git a/programs/gvfs-move.c b/programs/gvfs-move.c
index e39f1d9a..6d062beb 100644
--- a/programs/gvfs-move.c
+++ b/programs/gvfs-move.c
@@ -63,7 +63,7 @@ show_progress (goffset current_num_bytes,
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);
}
diff --git a/test/benchmark-posix-big-files.c b/test/benchmark-posix-big-files.c
index 875dd233..d8061cba 100644
--- a/test/benchmark-posix-big-files.c
+++ b/test/benchmark-posix-big-files.c
@@ -62,10 +62,8 @@ static gchar *
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 @@ static void
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 @@ read_file (const gchar *scratch_file)
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));