[easytag] Move drive icon code to avoid C90 error



commit a4203cccc14cbe3122dae453d39b836669a381e0
Author: David King <amigadave amigadave com>
Date:   Sun Apr 28 10:18:24 2013 +0100

    Move drive icon code to avoid C90 error
    
    Declarations must appear before code in standard C.

 src/browser.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/browser.c b/src/browser.c
index 0899e88..d1e5977 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -2454,6 +2454,14 @@ Browser_Popup_Menu_Handler (GtkWidget *widget, GdkEventButton *event,
 static void
 Browser_Tree_Initialize (void)
 {
+#ifdef G_OS_WIN32
+    DWORD drives;
+    UINT drive_type;
+    gchar drive[] = "A:/";
+    gchar drive_backslashed[] = "A:\\";
+    gchar drive_slashless[] = "A:";
+    gchar drive_label[256];
+#endif
     GtkTreeIter parent_iter;
     GtkTreeIter dummy_iter;
     GIcon *drive_icon;
@@ -2465,13 +2473,6 @@ Browser_Tree_Initialize (void)
 #ifdef G_OS_WIN32
     /* Code strangely familiar with gtkfilesystemwin32.c */
 
-    DWORD drives;
-    UINT drive_type;
-    gchar drive[4] = "A:/";
-    gchar drive_backslashed[5] = "A:\\";
-    gchar drive_slashless[3] = "A:";
-    gchar drive_label[256];
-
     drives = GetLogicalDrives();
     if (!drives)
         g_warning ("GetLogicalDrives failed.");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]