From 43ac206f7e67224ec2c79f7e47c8f1b83c6e23e5 Mon Sep 17 00:00:00 2001 From: gbakeman Date: Wed, 7 Feb 2024 15:07:55 -0500 Subject: [PATCH] Removing unused variable User reports that an OverflowException was occurring at line 587, where the `UPS_BattCh` double variable is cast to an Integer. It's not used for anything, so perhaps removing it will solve the issue. --- WinNUT_V2/WinNUT-Client/WinNUT.vb | 2 -- 1 file changed, 2 deletions(-) diff --git a/WinNUT_V2/WinNUT-Client/WinNUT.vb b/WinNUT_V2/WinNUT-Client/WinNUT.vb index fc2dccb..882b460 100644 --- a/WinNUT_V2/WinNUT-Client/WinNUT.vb +++ b/WinNUT_V2/WinNUT-Client/WinNUT.vb @@ -584,7 +584,6 @@ Public Class WinNUT End Sub Private Sub Event_UpdateBatteryState(Optional Reason As String = Nothing) Handles Me.UpdateBatteryState - Static Dim Old_Battery_Value As Integer = UPS_BattCh Dim Status As String = "Unknown" Select Case Reason Case Nothing, "Deconnected", "Lost Connect" @@ -606,7 +605,6 @@ Public Class WinNUT End If End If End Select - Old_Battery_Value = UPS_BattCh LogFile.LogTracing("Battery Status => " & Status, LogLvl.LOG_DEBUG, Me) End Sub