[glib/glib-2-52] Do not mix declarations with code.
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-52] Do not mix declarations with code.
- Date: Tue, 18 Apr 2017 06:30:43 +0000 (UTC)
commit 2eddcef1e75711c82719875ca80070eb6eb212ae
Author: John Lindgren <john jlindgren net>
Date: Thu Apr 13 22:31:29 2017 -0400
Do not mix declarations with code.
https://bugzilla.gnome.org/show_bug.cgi?id=781298
glib/gfileutils.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/glib/gfileutils.c b/glib/gfileutils.c
index 6789c53..ea3806e 100644
--- a/glib/gfileutils.c
+++ b/glib/gfileutils.c
@@ -317,6 +317,11 @@ gboolean
g_file_test (const gchar *filename,
GFileTest test)
{
+#ifdef G_OS_WIN32
+ int attributes;
+ wchar_t *wfilename;
+#endif
+
g_return_val_if_fail (filename != NULL, FALSE);
#ifdef G_OS_WIN32
@@ -327,8 +332,7 @@ g_file_test (const gchar *filename,
# ifndef FILE_ATTRIBUTE_DEVICE
# define FILE_ATTRIBUTE_DEVICE 64
# endif
- int attributes;
- wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL);
+ wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL);
if (wfilename == NULL)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]