Fix some code analysis issues (#841)

This commit is contained in:
PhyxionNL
2022-10-09 13:16:31 +02:00
committed by GitHub
parent 90b6c2025c
commit 3ac329f247
53 changed files with 419 additions and 514 deletions
@@ -117,7 +117,6 @@ namespace LibreHardwareMonitor.Hardware
if (_device == null)
return false;
return Kernel32.DeviceIoControl(_device, ioControlCode, inBuffer, inBuffer == null ? 0 : (uint)Marshal.SizeOf(inBuffer), null, 0, out uint _, IntPtr.Zero);
}
@@ -126,7 +125,6 @@ namespace LibreHardwareMonitor.Hardware
if (_device == null)
return false;
object boxedOutBuffer = outBuffer;
bool b = Kernel32.DeviceIoControl(_device,
ioControlCode,
@@ -146,7 +144,6 @@ namespace LibreHardwareMonitor.Hardware
if (_device == null)
return false;
object boxedOutBuffer = outBuffer;
bool b = Kernel32.DeviceIoControl(_device,
ioControlCode,
@@ -177,7 +174,6 @@ namespace LibreHardwareMonitor.Hardware
if (manager == IntPtr.Zero)
return false;
IntPtr service = AdvApi32.OpenService(manager, _serviceName, AdvApi32.SERVICE_ACCESS_MASK.SERVICE_ALL_ACCESS);
if (service == IntPtr.Zero)
{