[REACTOS] Fix warning C4146: unary minus operator applied to unsigned type, result still unsigned

This commit is contained in:
Timo Kreuzer 2019-05-26 13:37:31 +02:00
parent 64e182e429
commit 08c6d21e1f
6 changed files with 8 additions and 8 deletions

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))
{ {

View file

@ -29,8 +29,8 @@ SleepMs(ULONG Milliseconds)
{ {
LARGE_INTEGER Period; LARGE_INTEGER Period;
Period.QuadPart = -Milliseconds; Period.QuadPart = Milliseconds;
Period.QuadPart *= 10000; Period.QuadPart *= -10000;
KeDelayExecutionThread(KernelMode, FALSE, &Period); KeDelayExecutionThread(KernelMode, FALSE, &Period);
} }

View file

@ -809,7 +809,7 @@ CSR_API(BaseSrvDefineDosDevice)
/* There's a target provided - new device, update buffer */ /* There's a target provided - new device, update buffer */
else else
{ {
RtlInitUnicodeString(&LinkTarget, &CurrentBuffer[-TargetLength - 1]); RtlInitUnicodeString(&LinkTarget, CurrentBuffer - TargetLength - 1);
} }
/* /*

View file

@ -244,8 +244,8 @@ typedef struct
{ {
FONTOBJ *pfo; FONTOBJ *pfo;
PBMFD_FACE pface; PBMFD_FACE pface;
ULONG xScale; LONG xScale;
ULONG yScale; LONG yScale;
ULONG ulAngle; ULONG ulAngle;
} BMFD_FONT, *PBMFD_FONT; } BMFD_FONT, *PBMFD_FONT;

View file

@ -83,7 +83,7 @@ BmfdQueryGlyphAndBitmap(
PGLYPHENTRY pge; PGLYPHENTRY pge;
ULONG xSrc, ySrc, cxSrc, cySrc; ULONG xSrc, ySrc, cxSrc, cySrc;
ULONG xDst, yDst, cxDst, cyDst; ULONG xDst, yDst, cxDst, cyDst;
ULONG xScale, yScale; LONG xScale, yScale;
ULONG ulGlyphOffset, cjDstRow, color; ULONG ulGlyphOffset, cjDstRow, color;
PVOID pvSrc0, pvDst0; PVOID pvSrc0, pvDst0;

View file

@ -1752,7 +1752,7 @@ static void FASTCALL MENU_DrawBitmapItem(HDC hdc, PITEM lpitem, const RECT *rect
drawItem.itemData = lpitem->dwItemData; drawItem.itemData = lpitem->dwItemData;
/* some applications make this assumption on the DC's origin */ /* some applications make this assumption on the DC's origin */
GreSetViewportOrgEx( hdc, lpitem->xItem, lpitem->yItem, &origorg); GreSetViewportOrgEx( hdc, lpitem->xItem, lpitem->yItem, &origorg);
RECTL_vOffsetRect( &drawItem.rcItem, - lpitem->xItem, - lpitem->yItem); RECTL_vOffsetRect(&drawItem.rcItem, -(LONG)lpitem->xItem, -(LONG)lpitem->yItem);
co_IntSendMessage( UserHMGetHandle(WndOwner), WM_DRAWITEM, 0, (LPARAM)&drawItem); co_IntSendMessage( UserHMGetHandle(WndOwner), WM_DRAWITEM, 0, (LPARAM)&drawItem);
GreSetViewportOrgEx( hdc, origorg.x, origorg.y, NULL); GreSetViewportOrgEx( hdc, origorg.x, origorg.y, NULL);
return; return;