From 83445755b3b2d315feadf94cefbb74afc8f142bd Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 10 Dec 2007 15:24:53 +0000 Subject: [PATCH] Add some more G_OS_WIN32 conditionals to silence gcc warnings. 2007-12-10 Tor Lillqvist * glocalfile.c: Add some more G_OS_WIN32 conditionals to silence gcc warnings. svn path=/trunk/; revision=6088 --- gio/ChangeLog | 5 +++++ gio/glocalfile.c | 21 +++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/gio/ChangeLog b/gio/ChangeLog index 9da8eaf..d9c7f9a 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,8 @@ +2007-12-10 Tor Lillqvist + + * glocalfile.c: Add some more G_OS_WIN32 conditionals to silence + gcc warnings. + 2007-12-10 Alexander Larsson * gfile.c (g_file_set_display_name): diff --git a/gio/glocalfile.c b/gio/glocalfile.c index 121701b..cb1e443 100644 --- a/gio/glocalfile.c +++ b/gio/glocalfile.c @@ -663,9 +663,11 @@ get_fs_type (long f_type) } #endif +#ifndef G_OS_WIN32 + G_LOCK_DEFINE_STATIC(mount_info_hash); static GHashTable *mount_info_hash = NULL; -guint64 mount_info_hash_cache_time = 0; +static guint64 mount_info_hash_cache_time = 0; typedef enum { MOUNT_INFO_READONLY = 1<<0 @@ -750,6 +752,8 @@ get_mount_info (GFileInfo *fs_info, g_file_info_set_attribute_boolean (fs_info, G_FILE_ATTRIBUTE_FS_READONLY, TRUE); } +#endif + static GFileInfo * g_local_file_query_filesystem_info (GFile *file, const char *attributes, @@ -760,6 +764,7 @@ g_local_file_query_filesystem_info (GFile *file, GFileInfo *info; int statfs_result; gboolean no_size; +#ifndef G_OS_WIN32 guint64 block_size; #ifdef USE_STATFS struct statfs statfs_buffer; @@ -767,6 +772,7 @@ g_local_file_query_filesystem_info (GFile *file, #elif defined(USE_STATVFS) struct statvfs statfs_buffer; #endif +#endif GFileAttributeMatcher *attribute_matcher; no_size = FALSE; @@ -1289,6 +1295,8 @@ find_mountpoint_for (const char *file, } } +#ifndef G_OS_WIN32 + static char * find_topdir_for (const char *file) { @@ -1302,6 +1310,8 @@ find_topdir_for (const char *file) return find_mountpoint_for (dir, dir_dev); } +#endif + static char * get_unique_filename (const char *basename, int id) @@ -1400,10 +1410,9 @@ g_local_file_trash (GFile *file, GError **error) { GLocalFile *local = G_LOCAL_FILE (file); - struct stat file_stat, home_stat, trash_stat, global_stat; + struct stat file_stat, home_stat; const char *homedir; - char *dirname; - char *trashdir, *globaldir, *topdir, *infodir, *filesdir; + char *trashdir, *topdir, *infodir, *filesdir; char *basename, *trashname, *trashfile, *infoname, *infofile; char *original_name, *original_name_escaped; int i; @@ -1411,6 +1420,10 @@ g_local_file_trash (GFile *file, gboolean is_homedir_trash; char delete_time[32]; int fd; +#ifndef G_OS_WIN32 + struct stat trash_stat, global_stat; + char *dirname, *globaldir; +#endif if (g_lstat (local->filename, &file_stat) != 0) { -- 2.7.4