Hi. Here's a few cleanups for gio-standalone.
Cheers Kjartan
Index: programs/gio-monitor-dir.c =================================================================== --- programs/gio-monitor-dir.c (revisjon 735) +++ programs/gio-monitor-dir.c (arbeidskopi) @@ -21,7 +21,6 @@ */ #include <config.h> -#include <config.h> #include <stdio.h> #include <unistd.h> Index: programs/gio-monitor-file.c =================================================================== --- programs/gio-monitor-file.c (revisjon 735) +++ programs/gio-monitor-file.c (arbeidskopi) @@ -21,7 +21,6 @@ */ #include <config.h> -#include <config.h> #include <stdio.h> #include <unistd.h> Index: programs/gio-info.c =================================================================== --- programs/gio-info.c (revisjon 735) +++ programs/gio-info.c (arbeidskopi) @@ -235,7 +235,7 @@ { G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED, "Keep with file when moved" - }, + } }; first = TRUE; Index: gio/glocalfileinfo.c =================================================================== --- gio/glocalfileinfo.c (revisjon 735) +++ gio/glocalfileinfo.c (arbeidskopi) @@ -39,7 +39,6 @@ #include <selinux/selinux.h> #endif -#include <sys/types.h> #ifdef HAVE_XATTR #if defined HAVE_SYS_XATTR_H Index: gio/gdataoutputstream.c =================================================================== --- gio/gdataoutputstream.c (revisjon 735) +++ gio/gdataoutputstream.c (arbeidskopi) @@ -34,7 +34,7 @@ }; enum { - PROP_0, + PROP_0 }; static void g_data_output_stream_set_property (GObject *object, Index: gio/gfileattribute.h =================================================================== --- gio/gfileattribute.h (revisjon 735) +++ gio/gfileattribute.h (arbeidskopi) @@ -42,14 +42,14 @@ typedef enum { G_FILE_ATTRIBUTE_FLAGS_NONE = 0, G_FILE_ATTRIBUTE_FLAGS_COPY_WITH_FILE = 1 << 0, - G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED = 1 << 1, + G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED = 1 << 1 } GFileAttributeFlags; /* Used by g_file_set_attributes_from_info */ typedef enum { G_FILE_ATTRIBUTE_STATUS_UNSET = 0, G_FILE_ATTRIBUTE_STATUS_SET, - G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, + G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING } GFileAttributeStatus; #define G_FILE_ATTRIBUTE_VALUE_INIT {0} Index: gio/gunixmounts.c =================================================================== --- gio/gunixmounts.c (revisjon 735) +++ gio/gunixmounts.c (arbeidskopi) @@ -29,9 +29,6 @@ #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> #endif -#ifdef HAVE_SYS_MOUNT_H -#include <sys/mount.h> -#endif #ifdef HAVE_SYS_POLL_H #include <sys/poll.h> #endif @@ -117,7 +114,6 @@ #endif #if defined(HAVE_GETMNTINFO) && defined(HAVE_FSTAB_H) && defined(HAVE_SYS_MOUNT_H) -#include <sys/param.h> #include <sys/ucred.h> #include <sys/mount.h> #include <fstab.h> Index: gio/gappinfo.c =================================================================== --- gio/gappinfo.c (revisjon 735) +++ gio/gappinfo.c (arbeidskopi) @@ -451,7 +451,7 @@ * Returns: A new #GAppLaunchContext. **/ GAppLaunchContext * -g_app_launch_context_new () +g_app_launch_context_new (void) { return g_object_new (G_TYPE_APP_LAUNCH_CONTEXT, NULL); } Index: gio/gunixmounts.h =================================================================== --- gio/gunixmounts.h (revisjon 735) +++ gio/gunixmounts.h (arbeidskopi) @@ -44,7 +44,7 @@ G_UNIX_MOUNT_TYPE_SDMMC, G_UNIX_MOUNT_TYPE_IPOD, G_UNIX_MOUNT_TYPE_CAMERA, - G_UNIX_MOUNT_TYPE_HD, + G_UNIX_MOUNT_TYPE_HD } GUnixMountType; typedef struct _GUnixMountMonitor GUnixMountMonitor; Index: gio/ginputstream.c =================================================================== --- gio/ginputstream.c (revisjon 735) +++ gio/ginputstream.c (arbeidskopi) @@ -443,7 +443,7 @@ GInputStreamClass *class; gboolean res; - g_return_val_if_fail (G_IS_INPUT_STREAM (stream), -1); + g_return_val_if_fail (G_IS_INPUT_STREAM (stream), FALSE); class = G_INPUT_STREAM_GET_CLASS (stream); Index: gio/goutputstream.c =================================================================== --- gio/goutputstream.c (revisjon 735) +++ gio/goutputstream.c (arbeidskopi) @@ -520,7 +520,7 @@ GOutputStreamClass *class; gboolean res; - g_return_val_if_fail (G_IS_OUTPUT_STREAM (stream), -1); + g_return_val_if_fail (G_IS_OUTPUT_STREAM (stream), FALSE); class = G_OUTPUT_STREAM_GET_CLASS (stream); Index: gio/gfileenumerator.c =================================================================== --- gio/gfileenumerator.c (revisjon 735) +++ gio/gfileenumerator.c (arbeidskopi) @@ -419,7 +419,7 @@ { simple = G_SIMPLE_ASYNC_RESULT (result); if (g_simple_async_result_propagate_error (simple, error)) - return -1; + return FALSE; } class = G_FILE_ENUMERATOR_GET_CLASS (enumerator); Index: gio/test-streams.c =================================================================== --- gio/test-streams.c (revisjon 735) +++ gio/test-streams.c (arbeidskopi) @@ -58,7 +58,7 @@ static gboolean -test_memory_input_stream () +test_memory_input_stream (void) { GInputStream *stream; char buf[100]; @@ -246,7 +246,7 @@ } static gboolean -test_buffered_input_stream () +test_buffered_input_stream (void) { GInputStream *mem_stream; GInputStream *stream; @@ -289,7 +289,7 @@ } static gboolean -test_buffered_output_stream () +test_buffered_output_stream (void) { GOutputStream *mem_stream; GOutputStream *stream; Index: gio/test-gio.c =================================================================== --- gio/test-gio.c (revisjon 735) +++ gio/test-gio.c (arbeidskopi) @@ -50,7 +50,7 @@ } static void -test_out () +test_out (void) { GOutputStream *out; GFile *file; Index: gio/gfileinfo.c =================================================================== --- gio/gfileinfo.c (revisjon 735) +++ gio/gfileinfo.c (arbeidskopi) @@ -1886,7 +1886,7 @@ * * Returns: **/ -const const char * +const char * g_file_attribute_matcher_enumerate_next (GFileAttributeMatcher *matcher) { int i; Index: gio/gcontenttype.c =================================================================== --- gio/gcontenttype.c (revisjon 735) +++ gio/gcontenttype.c (arbeidskopi) @@ -450,7 +450,7 @@ typedef enum { MIME_TAG_TYPE_OTHER, - MIME_TAG_TYPE_COMMENT, + MIME_TAG_TYPE_COMMENT } MimeTagType; typedef struct { @@ -548,7 +548,7 @@ GMarkupParser parser = { mime_info_start_element, mime_info_end_element, - mime_info_text, + mime_info_text }; filename = g_build_filename (dir, "mime", basename, NULL); Index: gio/inotify/inotify-kernel.c =================================================================== --- gio/inotify/inotify-kernel.c (revisjon 735) +++ gio/inotify/inotify-kernel.c (arbeidskopi) @@ -584,7 +584,7 @@ } static void -ik_process_events () +ik_process_events (void) { g_queue_foreach (events_to_process, ik_pair_moves, NULL); Index: gio/inotify/ginotifyfilemonitor.c =================================================================== --- gio/inotify/ginotifyfilemonitor.c (revisjon 735) +++ gio/inotify/ginotifyfilemonitor.c (arbeidskopi) @@ -116,7 +116,7 @@ } static gboolean -g_inotify_file_monitor_is_supported () +g_inotify_file_monitor_is_supported (void) { return _ih_startup (); } Index: gio/inotify/inotify-path.c =================================================================== --- gio/inotify/inotify-path.c (revisjon 735) +++ gio/inotify/inotify-path.c (arbeidskopi) @@ -35,7 +35,6 @@ * problems with libc versions that was built without inotify support. * Instead we use the local version. */ -#include "local_inotify.h" #elif defined (HAVE_LINUX_INOTIFY_H) #include <linux/inotify.h> #endif Index: gio/inotify/inotify-diag.c =================================================================== --- gio/inotify/inotify-diag.c (revisjon 735) +++ gio/inotify/inotify-diag.c (arbeidskopi) @@ -38,8 +38,9 @@ static gboolean id_dump (gpointer userdata) { + GIOChannel *ioc; G_LOCK (inotify_lock); - GIOChannel *ioc = NULL; + ioc = NULL; pid_t pid = getpid (); char *fname; Index: gio/inotify/ginotifydirectorymonitor.c =================================================================== --- gio/inotify/ginotifydirectorymonitor.c (revisjon 735) +++ gio/inotify/ginotifydirectorymonitor.c (arbeidskopi) @@ -97,7 +97,7 @@ } static gboolean -g_inotify_directory_monitor_is_supported () +g_inotify_directory_monitor_is_supported (void) { return _ih_startup (); } Index: gio/gfile.c =================================================================== --- gio/gfile.c (revisjon 735) +++ gio/gfile.c (arbeidskopi) @@ -1670,7 +1670,7 @@ if (flags & G_FILE_COPY_OVERWRITE) { out = (GOutputStream *)g_file_replace (destination, - 0, 0, + NULL, 0, flags & G_FILE_COPY_BACKUP, cancellable, error); } Index: gio/gfile.h =================================================================== --- gio/gfile.h (revisjon 735) +++ gio/gfile.h (arbeidskopi) @@ -50,7 +50,7 @@ G_FILE_COPY_OVERWRITE = (1<<0), G_FILE_COPY_BACKUP = (1<<1), G_FILE_COPY_NOFOLLOW_SYMLINKS = (1<<2), - G_FILE_COPY_ALL_METADATA = (1<<3), + G_FILE_COPY_ALL_METADATA = (1<<3) } GFileCopyFlags; typedef enum { Index: gio/gsimpleasyncresult.c =================================================================== --- gio/gsimpleasyncresult.c (revisjon 735) +++ gio/gsimpleasyncresult.c (arbeidskopi) @@ -27,7 +27,6 @@ #include <string.h> #include <errno.h> #include <fcntl.h> -#include <sys/types.h> #include <unistd.h> #include "gsimpleasyncresult.h" Index: gio/glocalfile.c =================================================================== --- gio/glocalfile.c (revisjon 735) +++ gio/glocalfile.c (arbeidskopi) @@ -27,7 +27,6 @@ #include <string.h> #include <errno.h> #include <fcntl.h> -#include <sys/types.h> #include <unistd.h> #if HAVE_SYS_STATFS_H Index: gio/gdatainputstream.c =================================================================== --- gio/gdatainputstream.c (revisjon 735) +++ gio/gdatainputstream.c (arbeidskopi) @@ -35,7 +35,7 @@ }; enum { - PROP_0, + PROP_0 }; static void g_data_input_stream_set_property (GObject *object, Index: gio/fam/fam-helper.c =================================================================== --- gio/fam/fam-helper.c (revisjon 735) +++ gio/fam/fam-helper.c (arbeidskopi) @@ -95,6 +95,7 @@ GDirectoryMonitor* monitor = G_DIRECTORY_MONITOR (sub->user_data); GFileMonitorEvent eflags = fam_event_to_file_monitor_event (ev.code); gchar* path = NULL; + GFile *child, *parent; /* unsupported event */ if (eflags == -1) @@ -104,25 +105,27 @@ path = g_strdup (ev.filename); else path = g_strdup_printf ("%s/%s", sub->pathname, ev.filename); - GFile* child = g_file_new_for_path (path); - GFile* parent = g_file_get_parent (child); + + child = g_file_new_for_path (path); + parent = g_file_get_parent (child); g_directory_monitor_emit_event (monitor, child, NULL, eflags); g_free (path); g_object_unref (child); g_object_unref (parent); } else { - GFileMonitor* monitor = G_FILE_MONITOR (sub->user_data); - GFileMonitorEvent eflags = fam_event_to_file_monitor_event (ev.code); - gchar* path = NULL; + GFile *child; + GFileMonitor* monitor = G_FILE_MONITOR (sub->user_data); + GFileMonitorEvent eflags = fam_event_to_file_monitor_event (ev.code); + gchar* path = NULL; - if (eflags == -1) - continue; - path = g_strdup (ev.filename); - GFile* child = g_file_new_for_path (path); - g_file_monitor_emit_event (monitor, child, NULL, eflags); - g_free (path); - g_object_unref (child); - } + if (eflags == -1) + continue; + path = g_strdup (ev.filename); + child = g_file_new_for_path (path); + g_file_monitor_emit_event (monitor, child, NULL, eflags); + g_free (path); + g_object_unref (child); + } } return TRUE; Index: gio/fam/gfamfilemonitor.c =================================================================== --- gio/fam/gfamfilemonitor.c (revisjon 735) +++ gio/fam/gfamfilemonitor.c (arbeidskopi) @@ -97,7 +97,7 @@ } static gboolean -g_fam_file_monitor_is_supported () +g_fam_file_monitor_is_supported (void) { return _fam_sub_startup (); } Index: gio/fam/gfamdirectorymonitor.c =================================================================== --- gio/fam/gfamdirectorymonitor.c (revisjon 735) +++ gio/fam/gfamdirectorymonitor.c (arbeidskopi) @@ -97,7 +97,7 @@ } static gboolean -g_fam_directory_monitor_is_supported () +g_fam_directory_monitor_is_supported (void) { return _fam_sub_startup (); } Index: gio/gioerror.h =================================================================== --- gio/gioerror.h (revisjon 735) +++ gio/gioerror.h (arbeidskopi) @@ -67,7 +67,7 @@ G_IO_ERROR_WOULD_RECURSE, G_IO_ERROR_BUSY, G_IO_ERROR_WOULD_BLOCK, - G_IO_ERROR_HOST_NOT_FOUND, + G_IO_ERROR_HOST_NOT_FOUND } GIOErrorEnum; GIOErrorEnum g_io_error_from_errno (gint err_no); Index: gio/gdummyfile.c =================================================================== --- gio/gdummyfile.c (revisjon 735) +++ gio/gdummyfile.c (arbeidskopi) @@ -27,7 +27,6 @@ #include <string.h> #include <errno.h> #include <fcntl.h> -#include <sys/types.h> #include <unistd.h> #include <stdlib.h> Index: gio/gpollfilemonitor.c =================================================================== --- gio/gpollfilemonitor.c (revisjon 735) +++ gio/gpollfilemonitor.c (arbeidskopi) @@ -71,7 +71,7 @@ { } -static gboolean +static int safe_strcmp (const char *a, const char *b) { if (a == NULL && b == NULL)
_______________________________________________ gnome-vfs-list mailing list gnome-vfs-list@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-vfs-list