Remove warnings
authorMiguel de Icaza <miguel@gnome.org>
Thu, 28 Aug 2008 05:00:50 +0000 (05:00 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Thu, 28 Aug 2008 05:00:50 +0000 (05:00 -0000)
svn path=/trunk/mcs/; revision=111785

mcs/mcs/getline.cs
mcs/mcs/repl.cs

index c6a97c799d6e20bda235dd419b6dc22498bd6fd0..20350e40bf4633552888778cf5c105448db75849 100644 (file)
@@ -32,7 +32,7 @@ using System.Threading;
 namespace Mono.Terminal {
 
        public class LineEditor {
-               static StreamWriter log;
+               //static StreamWriter log;
                
                // The text being edited.
                StringBuilder text;
index d2a139933e25a67efec176a4f38f8f20eaee783a..49c5bf2a1bbc2f410ddb0735c916605627d56c37 100644 (file)
@@ -24,18 +24,17 @@ namespace Mono.CSharp {
 
        public static class InteractiveShell {
                static bool isatty = true;
-               static bool dumb;
                static public ArrayList using_alias_list = new ArrayList ();
                static public ArrayList using_list = new ArrayList ();
                public static Hashtable fields = new Hashtable ();
 
-               static Thread invoke_thread;
-               
                static int count;
                static string current_debug_name;
 
 #if NET_2_0 && !SMCS_SOURCE
                static Mono.Terminal.LineEditor editor;
+               static bool dumb;
+               static Thread invoke_thread;
 
                static void ConsoleInterrupt (object sender, ConsoleCancelEventArgs a)
                {
@@ -48,6 +47,9 @@ namespace Mono.CSharp {
                
                static void SetupConsole ()
                {
+                       string term = Environment.GetEnvironmentVariable ("TERM");
+                       dumb = term == "dumb" || term == null || isatty == false;
+                       
                        editor = new Mono.Terminal.LineEditor ("csharp");
                        Console.CancelKeyPress += ConsoleInterrupt;
                        invoke_thread = System.Threading.Thread.CurrentThread;
@@ -69,7 +71,9 @@ namespace Mono.CSharp {
 #else
                static void SetupConsole ()
                {
-                       dumb = true;
+                       // Here just to shut up the compiler warnings about unused invoking variable
+                       if (invoking)
+                               invoking = false;
                }
 
                static string GetLine (bool primary)
@@ -110,8 +114,6 @@ namespace Mono.CSharp {
                static void InitTerminal ()
                {
                        isatty = UnixUtils.isatty (0) && UnixUtils.isatty (1);
-                       string term = Environment.GetEnvironmentVariable ("TERM");
-                       dumb = term == "dumb" || term == null || isatty == false;
 
                        SetupConsole ();