Browse Source

fixed compiler warning

svn path=/trunk/mcs/; revision=25669
Dennis Hayes 22 years ago
parent
commit
fe3bfe1bf1

+ 7 - 7
mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/FileSystem.cs

@@ -31,7 +31,7 @@ namespace Microsoft.VisualBasic
                 	{
                 		Environment.CurrentDirectory=Path;
                 	}
-                	catch ( Exception e){ throw new System.IO.FileNotFoundException ("Invalid drive is specified, or drive is unavailable");}
+                	catch /*( Exception e)*/{ throw new System.IO.FileNotFoundException ("Invalid drive is specified, or drive is unavailable");}
                 	
                 }
                 
@@ -458,13 +458,13 @@ namespace Microsoft.VisualBasic
 		{
 			System.Single DecimalValue=0;
 			string buffer="";
-			int factor=1;
+			//int factor=1;
 			string BufDecimal="";
 			InternalInputExceptions(FileNumber);
 			buffer=InternalInput(FileNumber,2);
 			if (buffer[0]=='-')
 			{
-				factor=-1;
+				//factor=-1;
 				buffer=buffer.Substring(1);
 			}
 			if ( buffer.IndexOf(".")>=0)
@@ -507,13 +507,13 @@ namespace Microsoft.VisualBasic
 		{
 			double DecimalValue=0;
 			string buffer="";
-			int factor=1;
+			//int factor=1;
 			string BufDecimal="";
 			InternalInputExceptions(FileNumber);
 			buffer=InternalInput(FileNumber,2);
 			if (buffer[0]=='-')
 			{
-				factor=-1;
+				//factor=-1;
 				buffer=buffer.Substring(1);
 			}
 			if ( buffer.IndexOf(".")>=0)
@@ -556,7 +556,7 @@ namespace Microsoft.VisualBasic
                 [MonoTODO("Needs Testing")]
                 public static void Input (System.Int32 FileNumber, ref System.String Value)
 		{
-			string buffer="";
+			//string buffer="";
 			InternalInputExceptions(FileNumber);
 			Value=InternalInput(FileNumber,0);
 		}
@@ -1042,7 +1042,7 @@ namespace Microsoft.VisualBasic
                 			{
                 				FHandle[bucle].Close();	
                 			}
-                			catch (Exception e) 
+                			catch /*(Exception e) */
 					{ 
 						FHandle[bucle]=null ;
 					}

+ 1 - 1
mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/DoubleType.cs

@@ -135,7 +135,7 @@ namespace Microsoft.VisualBasic.CompilerServices
 				//			d = ClrDouble.Parse(Value, NumberStyles.Any, numberFormat);
 				d = double.Parse(Value, NumberStyles.Any, numberFormat);
 			}
-			catch (Exception e) {
+			catch /*(Exception e)*/ {
 				//			d = ClrDouble.Parse(Value, 255, numberFormat);
 				d = double.Parse(Value, (NumberStyles)255, numberFormat);
 			}

+ 1 - 1
mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/ExceptionUtils.cs

@@ -348,8 +348,8 @@ namespace Microsoft.VisualBasic.CompilerServices {
 		 */
 		
 		public static void ThrowException1(int hr, string param1) {
-			string str = "";
 			//TODO: delete or convert???
+			//string str = "";
 
 			//			if (hr > 0 && hr <= 65535)
 			//			

+ 20 - 19
mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/LateBinding.cs

@@ -73,8 +73,8 @@ namespace Microsoft.VisualBasic.CompilerServices {
 				// no member with the name specified found
 				throw new NullReferenceException();
 			}
-
-			int invokeAttr = 0;
+			//TODO removed to fix compile warning, add when used.
+			//int invokeAttr = 0;
 
 			if (memberInfo[0] is MethodInfo) {
 				// the member is a method
@@ -100,7 +100,7 @@ namespace Microsoft.VisualBasic.CompilerServices {
 
 			// invoke member - takes care about all three cases : field,property and field.
 			// TODO: 
-			throw new NotImplementedException("LateBinding not implmented");
+			//throw new NotImplementedException("LateBinding not implmented");
 			//return objType.InvokeMember(name, invokeAttr, null, o, args);
 		}
 
@@ -145,7 +145,8 @@ namespace Microsoft.VisualBasic.CompilerServices {
 				throw new NullReferenceException();
 			}
 
-			int invokeAttr = 0;
+			// TODO: readd when used
+			//int invokeAttr = 0;
 
 			if (memberInfo[0] is PropertyInfo) {
 				// the member is a property
@@ -165,7 +166,7 @@ namespace Microsoft.VisualBasic.CompilerServices {
 
 			// invoke member - takes care about the cases : field and property.
 			// TODO: 
-			throw new NotImplementedException("LateBinding not implmented");
+			//throw new NotImplementedException("LateBinding not implmented");
 			//objType.InvokeMember(name, invokeAttr, null, o, args);
 		}
 		//mono implmentation
@@ -255,8 +256,8 @@ namespace Microsoft.VisualBasic.CompilerServices {
 			for (int i = 0; i < types.Length; i++) {
 				types[i] = args[i].GetType();
 			}
-			string defaultPropName;
 			// TODO: 
+			//string defaultPropName;
 			throw new NotImplementedException("LateBinding not implmented");
 			//if (type is TypeInfo)
 			//	defaultPropName = getDefaultMemberName(type);
@@ -384,7 +385,7 @@ namespace Microsoft.VisualBasic.CompilerServices {
 				//types[i] = ObjectStaticWrapper.GetType(args[i]);
 				//System.out.println("in Set:" + types[i].get_FullName());
 			}
-			string defaultPropName;
+			//string defaultPropName;
 				// TODO: 
 				throw new NotImplementedException("LateBinding not implmented");
 			//if (type is TypeInfo)
@@ -394,19 +395,19 @@ namespace Microsoft.VisualBasic.CompilerServices {
 			//	defaultPropName = "Chars";
 			//else
 			//	defaultPropName = "Item";
-			PropertyInfo propertyInfo = null;
-			if (defaultPropName != null)
-				propertyInfo = type.GetProperty(defaultPropName, types);
-			if (propertyInfo != null) {
-				object newVal = args[args.Length - 1];
-				object[] Params = new object[args.Length - 1];
+			//PropertyInfo propertyInfo = null;
+			//if (defaultPropName != null)
+			//	propertyInfo = type.GetProperty(defaultPropName, types);
+			//if (propertyInfo != null) {
+			//	object newVal = args[args.Length - 1];
+			//	object[] Params = new object[args.Length - 1];
 
-				Array.Copy(args, 0, Params, 0, args.Length - 1);
-				// java System.arraycopy(args, 0, Params, 0, args.Length - 1);
-				propertyInfo.SetValue(o, newVal, Params);
-			}
-			else
-				throw new NotSupportedException();
+			//	Array.Copy(args, 0, Params, 0, args.Length - 1);
+			//	// java System.arraycopy(args, 0, Params, 0, args.Length - 1);
+			//	propertyInfo.SetValue(o, newVal, Params);
+			//}
+			//else
+			//	throw new NotSupportedException();
 		}
 
 		[System.Diagnostics.DebuggerHiddenAttribute]