From 0e09aea9a49e870df5481ffd7cd8c77173695af4 Mon Sep 17 00:00:00 2001 From: llsth Date: Mon, 28 Mar 2016 11:15:36 +0200 Subject: [PATCH] Clean up compiler warnings --- NPlot/AdapterUtils.cs | 4 ++-- NPlot/BarPlot.cs | 2 +- NPlot/HistogramPlot.cs | 2 +- NPlot/LogAxis.cs | 16 ++++++++-------- NPlot/TextItem.cs | 2 +- NPlot/Windows.PlotSurface2D.cs | 12 ++++++------ Ntp.Analyzer.Data/File/NtpConfMapper.cs | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/NPlot/AdapterUtils.cs b/NPlot/AdapterUtils.cs index 09e0b8f5..17d2fe04 100755 --- a/NPlot/AdapterUtils.cs +++ b/NPlot/AdapterUtils.cs @@ -601,7 +601,7 @@ namespace NPlot { private readonly int abscissaColumnNumber_; private readonly DataRowCollection rows_; - private string abscissaName_; + //private string abscissaName_; /// /// Constructor @@ -611,7 +611,7 @@ namespace NPlot public DataGetter_MultiRows(DataRowCollection rows, string omitThisColumn) { rows_ = rows; - abscissaName_ = omitThisColumn; + //abscissaName_ = omitThisColumn; abscissaColumnNumber_ = rows_[0].Table.Columns.IndexOf(omitThisColumn); if (abscissaColumnNumber_ < 0) diff --git a/NPlot/BarPlot.cs b/NPlot/BarPlot.cs index b6c20c29..4f67bd38 100755 --- a/NPlot/BarPlot.cs +++ b/NPlot/BarPlot.cs @@ -178,7 +178,7 @@ namespace NPlot public virtual void DrawInLegend(Graphics g, Rectangle startEnd) { int smallerHeight = (int) (startEnd.Height*0.5f); - int heightToRemove = (int) (startEnd.Height*0.5f); + //int heightToRemove = (int) (startEnd.Height*0.5f); Rectangle newRectangle = new Rectangle(startEnd.Left, startEnd.Top + smallerHeight/2, startEnd.Width, smallerHeight); g.FillRectangle(rectangleBrush_.Get(newRectangle), newRectangle); g.DrawRectangle(borderPen_, newRectangle); diff --git a/NPlot/HistogramPlot.cs b/NPlot/HistogramPlot.cs index 8270a68d..f0d37d04 100755 --- a/NPlot/HistogramPlot.cs +++ b/NPlot/HistogramPlot.cs @@ -218,7 +218,7 @@ namespace NPlot PointF xPos1 = xAxis.WorldToPhysical(p1.X, false); PointF yPos1 = yAxis.WorldToPhysical(p1.Y, false); PointF xPos2 = xAxis.WorldToPhysical(p2.X, false); - PointF yPos2 = yAxis.WorldToPhysical(p2.Y, false); + //PointF yPos2 = yAxis.WorldToPhysical(p2.Y, false); if (isStacked_) { diff --git a/NPlot/LogAxis.cs b/NPlot/LogAxis.cs index 6d1ac018..39aacf28 100755 --- a/NPlot/LogAxis.cs +++ b/NPlot/LogAxis.cs @@ -212,8 +212,8 @@ namespace NPlot ArrayList smallTickPositions; WorldTickPositions(physicalMin, physicalMax, out largeTickPositions, out smallTickPositions); - Point offset = new Point(0, 0); - object bb = null; + //Point offset = new Point(0, 0); + //object bb = null; // Missed this protection if (largeTickPositions.Count > 0) { @@ -231,12 +231,12 @@ namespace NPlot else { // just get the axis bounding box) - PointF dir = Utils.UnitVector(physicalMin, physicalMax); - Rectangle rr = new Rectangle(physicalMin.X, - (int) ((physicalMax.X - physicalMin.X)*dir.X), - physicalMin.Y, - (int) ((physicalMax.Y - physicalMin.Y)*dir.Y)); - bb = rr; + //PointF dir = Utils.UnitVector(physicalMin, physicalMax); + //Rectangle rr = new Rectangle(physicalMin.X, + // (int) ((physicalMax.X - physicalMin.X)*dir.X), + // physicalMin.Y, + // (int) ((physicalMax.Y - physicalMin.Y)*dir.Y)); + //bb = rr; } // missed protection for zero ticks diff --git a/NPlot/TextItem.cs b/NPlot/TextItem.cs index 34346e1f..bdc8e9f6 100755 --- a/NPlot/TextItem.cs +++ b/NPlot/TextItem.cs @@ -39,7 +39,7 @@ namespace NPlot public class TextItem : IDrawable { private Font font_; - private Pen pen_ = new Pen(Color.Black); + //private Pen pen_ = new Pen(Color.Black); private PointD start_; private Brush textBrush_ = new SolidBrush(Color.Black); private string text_ = ""; diff --git a/NPlot/Windows.PlotSurface2D.cs b/NPlot/Windows.PlotSurface2D.cs index a514b2da..3a6eaa74 100755 --- a/NPlot/Windows.PlotSurface2D.cs +++ b/NPlot/Windows.PlotSurface2D.cs @@ -70,7 +70,7 @@ namespace NPlot.Windows private KeyEventArgs lastKeyEventArgs_; private PlotContextMenu rightMenu_; - private ArrayList selectedObjects_; + //private ArrayList selectedObjects_; private Axis xAxis1ZoomCache_; private Axis xAxis2ZoomCache_; @@ -378,7 +378,7 @@ namespace NPlot.Windows Browsable(true), Bindable(true) ] - public int Padding + public new int Padding { get { return ps_.Padding; } set { ps_.Padding = value; } @@ -690,7 +690,7 @@ namespace NPlot.Windows if (e.Button == MouseButtons.Right) { Point here = new Point(e.X, e.Y); - selectedObjects_ = ps_.HitTest(here); + //selectedObjects_ = ps_.HitTest(here); if (rightMenu_ != null) rightMenu_.Menu.Show(ctr, here); } @@ -2407,8 +2407,8 @@ namespace NPlot.Windows doing_ = true; axis_ = (Axis) o; - PhysicalAxis[] physicalAxisList = new[] - {ps.PhysicalXAxis1Cache, ps.PhysicalXAxis2Cache, ps.PhysicalYAxis1Cache, ps.PhysicalYAxis2Cache}; + //PhysicalAxis[] physicalAxisList = new[] + // {ps.PhysicalXAxis1Cache, ps.PhysicalXAxis2Cache, ps.PhysicalYAxis1Cache, ps.PhysicalYAxis2Cache}; if (ps.PhysicalXAxis1Cache.Axis == axis_) physicalAxis_ = ps.PhysicalXAxis1Cache; @@ -2520,7 +2520,7 @@ namespace NPlot.Windows /// public class MouseWheelZoom : Interaction { - private Point point_ = new Point(-1, -1); + //private Point point_ = new Point(-1, -1); private float sensitivity_ = 60.0f; /// diff --git a/Ntp.Analyzer.Data/File/NtpConfMapper.cs b/Ntp.Analyzer.Data/File/NtpConfMapper.cs index e525b933..1a3ae7b3 100644 --- a/Ntp.Analyzer.Data/File/NtpConfMapper.cs +++ b/Ntp.Analyzer.Data/File/NtpConfMapper.cs @@ -136,7 +136,7 @@ namespace Ntp.Analyzer.Data.File try { IPHostEntry hostEntry = Dns.GetHostEntry (ip); name = hostEntry.HostName; - } catch (Exception e) { + } catch { name = ip.ToString (); } }