Skip to content

Commit

Permalink
Removing unused variable
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gbakeman committed Feb 7, 2024
1 parent 0920799 commit 43ac206
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions WinNUT_V2/WinNUT-Client/WinNUT.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand Down

0 comments on commit 43ac206

Please sign in to comment.