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))
{
{
LARGE_INTEGER Period;
- Period.QuadPart = -Milliseconds;
- Period.QuadPart *= 10000;
+ Period.QuadPart = Milliseconds;
+ Period.QuadPart *= -10000;
KeDelayExecutionThread(KernelMode, FALSE, &Period);
}
/* There's a target provided - new device, update buffer */
else
{
- RtlInitUnicodeString(&LinkTarget, &CurrentBuffer[-TargetLength - 1]);
+ RtlInitUnicodeString(&LinkTarget, CurrentBuffer - TargetLength - 1);
}
/*
{
FONTOBJ *pfo;
PBMFD_FACE pface;
- ULONG xScale;
- ULONG yScale;
+ LONG xScale;
+ LONG yScale;
ULONG ulAngle;
} BMFD_FONT, *PBMFD_FONT;
PGLYPHENTRY pge;
ULONG xSrc, ySrc, cxSrc, cySrc;
ULONG xDst, yDst, cxDst, cyDst;
- ULONG xScale, yScale;
+ LONG xScale, yScale;
ULONG ulGlyphOffset, cjDstRow, color;
PVOID pvSrc0, pvDst0;
drawItem.itemData = lpitem->dwItemData;
/* some applications make this assumption on the DC's origin */
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);
GreSetViewportOrgEx( hdc, origorg.x, origorg.y, NULL);
return;