From fa65d22e84af9e4063c891073d9bddd448eb9204 Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Fri, 29 Aug 2008 09:46:50 +0000 Subject: [PATCH] Warnings cleanup svn path=/trunk/mcs/; revision=111903 --- .../System.Resources/ResXResourceWriter.cs | 2 ++ .../Managed.Windows.Forms/System.Windows.Forms/Control.cs | 4 ++-- .../System.Windows.Forms/DataGridBoolColumn.cs | 1 - .../System.Windows.Forms/DataGridView.cs | 2 +- .../System.Windows.Forms/DataGridViewCheckBoxCell.cs | 2 +- .../System.Windows.Forms/HtmlWindow.cs | 2 +- .../Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs | 6 +++++- .../Managed.Windows.Forms/System.Windows.Forms/ListView.cs | 4 ++++ .../System.Windows.Forms/ListViewItem.cs | 4 ++-- .../Managed.Windows.Forms/System.Windows.Forms/OSFeature.cs | 2 ++ .../Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs | 2 ++ .../System.Windows.Forms/XplatUICarbon.cs | 1 - .../System.Windows.Forms/XplatUIX11.cs | 2 -- 13 files changed, 22 insertions(+), 12 deletions(-) diff --git a/mcs/class/Managed.Windows.Forms/System.Resources/ResXResourceWriter.cs b/mcs/class/Managed.Windows.Forms/System.Resources/ResXResourceWriter.cs index 673aaf691f0..5c274abb1ef 100644 --- a/mcs/class/Managed.Windows.Forms/System.Resources/ResXResourceWriter.cs +++ b/mcs/class/Managed.Windows.Forms/System.Resources/ResXResourceWriter.cs @@ -49,7 +49,9 @@ namespace System.Resources private TextWriter textwriter; private XmlTextWriter writer; private bool written; +#if NET_2_0 private string base_path; +#endif #endregion // Local Variables #region Static Fields diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs index 4e5967f0e4c..d8b9eb16fd7 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs @@ -5772,12 +5772,12 @@ namespace System.Windows.Forms // Make sure all our children are properly parented to us Control [] controls = child_controls.GetAllControls (); - bool parented = false; +// bool parented = false; for (int i=0; i 0 ? Rows[Math.Min (Rows.Count - 1, first_row_index)].Height : 0; - int room_left = this.Height; +// int room_left = this.Height; // Reset all columns to !Displayed for (int i = 0; i < Columns.Count; i++) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewCheckBoxCell.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewCheckBoxCell.cs index 329064ee6f9..7139e9d663e 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewCheckBoxCell.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewCheckBoxCell.cs @@ -42,7 +42,7 @@ namespace System.Windows.Forms { private object indeterminateValue; private bool threeState; private object trueValue; - private Type valueType; +// private Type valueType; private PushButtonState check_state; public DataGridViewCheckBoxCell () diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/HtmlWindow.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/HtmlWindow.cs index e124df1ed24..95ebfb255c5 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/HtmlWindow.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/HtmlWindow.cs @@ -140,7 +140,7 @@ namespace System.Windows.Forms public string Prompt (string message, string defaultInputValue) { WebBrowserDialogs.Prompt prompt = new WebBrowserDialogs.Prompt ("Prompt", message, defaultInputValue); - DialogResult ret = prompt.Show (); + prompt.Show (); return prompt.Text; } diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs index 62575d37119..0f170d29220 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs @@ -920,7 +920,9 @@ namespace System.Windows.Forms public class LinkCollection : IList, ICollection, IEnumerable { private LinkLabel owner; - private bool links_added = false; +#if NET_2_0 + private bool links_added; +#endif public LinkCollection (LinkLabel owner) { @@ -982,7 +984,9 @@ namespace System.Windows.Forms } int idx = owner.links.Add (value); +#if NET_2_0 links_added = true; +#endif owner.sorted_links = null; owner.CheckLinks (); diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs index 1bec32079ed..1f510f54ece 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs @@ -1846,7 +1846,9 @@ namespace System.Windows.Forms ListViewItem item = items [i]; item.Layout (); item.DisplayIndex = display_index; +#if NET_2_0 item.SetPosition (new Point (x, y)); +#endif } @@ -1977,7 +1979,9 @@ namespace System.Windows.Forms { display_index = i; SetItemLocation (i, 0, y, 0, 0); +#if NET_2_0 item.SetPosition (new Point (0, y)); +#endif y += item_height; } #if NET_2_0 diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs index a224cb70712..a54c3ee7d31 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs @@ -52,8 +52,8 @@ namespace System.Windows.Forms private string image_key = String.Empty; string tooltip_text = String.Empty; int indent_count; + Point position = new Point (-1, -1); // cached to mimic .Net behaviour #endif - Point position = new Point (-1, -1); // cached to mimic .Net behaviour Rectangle bounds = Rectangle.Empty; Rectangle checkbox_rect; // calculated by CalcListViewItem method Rectangle icon_rect; @@ -893,11 +893,11 @@ namespace System.Windows.Forms this.group = group; } -#endif internal void SetPosition (Point position) { this.position = position; } +#endif // When focus changed, we need to invalidate area // with previous layout and with the new one diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/OSFeature.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/OSFeature.cs index 2e89f9bf0ab..4899445a75b 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/OSFeature.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/OSFeature.cs @@ -53,7 +53,9 @@ namespace System.Windows.Forms { #if NET_2_0 public static bool IsPresent (SystemParameter enumVal) { +#pragma warning disable 219 object o; +#pragma warning restore 219 switch (enumVal) { case SystemParameter.DropShadow: diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs index 95be40df466..7c839586d0a 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs @@ -872,6 +872,7 @@ namespace System.Windows.Forms { } #if NET_2_0 +/* private void Hide (Control sender) { timer.Stop(); @@ -884,6 +885,7 @@ namespace System.Windows.Forms { if (last_control == sender) last_control = null; } +*/ #endif private void control_MouseMove(object sender, MouseEventArgs e) { diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs index 259b4ce113d..e8521587784 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs @@ -1592,7 +1592,6 @@ namespace System.Windows.Forms { return true; } } - return false; } internal override bool PostMessage (IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam) { diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs index 7857fa9705f..d1fb0d51be4 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs @@ -3973,8 +3973,6 @@ namespace System.Windows.Forms { } else { HitTest ht; IntPtr dummy; - int screen_x; - int screen_y; #if DriverDebugExtra Console.WriteLine("GetMessage(): non-client area {0:X} MotionNotify x={1} y={2}", client ? hwnd.client_window.ToInt32() : hwnd.whole_window.ToInt32(), xevent.MotionEvent.x, xevent.MotionEvent.y); -- 2.25.1