[0.4.12][CMBATT] Fix 1 MSVC2010SP1 x86 dbg warning C4146 CORE-18104

can be observed with MSVC 2010SP1 (16.0.40219.1) x86 target in dbg configuation:
C:\047rls\reactos\drivers\bus\acpi\cmbatt\cmbatt.c(983) : warning C4146: unary minus operator applied to unsigned type, result still unsigned

partial pick of 0.4.13-dev-713-g 08c6d21e1f
This commit is contained in:
Joachim Henze 2022-03-29 00:42:04 +02:00
parent 8e301bf4ad
commit 30f2a01964

View File

@ -980,7 +980,7 @@ CmBattGetBatteryStatus(IN PCMBATT_DEVICE_EXTENSION DeviceExtension,
else if (DeviceExtension->State & BATTERY_DISCHARGING) else if (DeviceExtension->State & BATTERY_DISCHARGING)
{ {
/* The battery is discharging, so treat the rate as a negative rate */ /* The battery is discharging, so treat the rate as a negative rate */
DeviceExtension->Rate = -DeviceExtension->Rate; DeviceExtension->Rate = -(LONG)DeviceExtension->Rate;
} }
else if (!(DeviceExtension->State & BATTERY_CHARGING) && (DeviceExtension->Rate)) else if (!(DeviceExtension->State & BATTERY_CHARGING) && (DeviceExtension->Rate))
{ {