[0.4.11][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:43:17 +02:00
parent da1574418a
commit 445753f1ca

View file

@ -980,7 +980,7 @@ CmBattGetBatteryStatus(IN PCMBATT_DEVICE_EXTENSION DeviceExtension,
else if (DeviceExtension->State & BATTERY_DISCHARGING)
{
/* 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))
{