diff options
author | Alexander Larsson <alexl@redhat.com> | 2008-02-19 09:41:06 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2008-02-19 09:41:06 +0000 |
commit | b64547deb808046b8bac687242ab777c0bf0d73a (patch) | |
tree | 3c7b9cb07e93beabc2f2efbe879ee279a525c449 /daemon | |
parent | 31a620e564b9edb751c19c71193ca73123faddb4 (diff) | |
download | gvfs-b64547deb808046b8bac687242ab777c0bf0d73a.tar.gz |
Code cleanup from Kjartan: Removes unused code/variables. Uses right
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
svn path=/trunk/; revision=1302
Diffstat (limited to 'daemon')
49 files changed, 88 insertions, 146 deletions
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) |