projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
64e182e
)
[REACTOS] Fix warning C4146: unary minus operator applied to unsigned type, result...
author
Timo Kreuzer
<timo.kreuzer@reactos.org>
Sun, 26 May 2019 11:37:31 +0000
(13:37 +0200)
committer
Timo Kreuzer
<timo.kreuzer@reactos.org>
Sat, 27 Jul 2019 09:21:28 +0000
(11:21 +0200)
drivers/bus/acpi/cmbatt/cmbatt.c
patch
|
blob
|
history
sdk/lib/drivers/sound/shared/time.c
patch
|
blob
|
history
subsystems/win/basesrv/dosdev.c
patch
|
blob
|
history
win32ss/drivers/font/bmfd/bmfd.h
patch
|
blob
|
history
win32ss/drivers/font/bmfd/glyph.c
patch
|
blob
|
history
win32ss/user/ntuser/menu.c
patch
|
blob
|
history
diff --git
a/drivers/bus/acpi/cmbatt/cmbatt.c
b/drivers/bus/acpi/cmbatt/cmbatt.c
index
775f755
..
cdac118
100644
(file)
--- a/
drivers/bus/acpi/cmbatt/cmbatt.c
+++ b/
drivers/bus/acpi/cmbatt/cmbatt.c
@@
-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 */
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))
{
}
else if (!(DeviceExtension->State & BATTERY_CHARGING) && (DeviceExtension->Rate))
{
diff --git
a/sdk/lib/drivers/sound/shared/time.c
b/sdk/lib/drivers/sound/shared/time.c
index
19b61bc
..
70e0d36
100644
(file)
--- a/
sdk/lib/drivers/sound/shared/time.c
+++ b/
sdk/lib/drivers/sound/shared/time.c
@@
-29,8
+29,8
@@
SleepMs(ULONG Milliseconds)
{
LARGE_INTEGER Period;
{
LARGE_INTEGER Period;
- Period.QuadPart =
-
Milliseconds;
- Period.QuadPart *= 10000;
+ Period.QuadPart = Milliseconds;
+ Period.QuadPart *=
-
10000;
KeDelayExecutionThread(KernelMode, FALSE, &Period);
}
KeDelayExecutionThread(KernelMode, FALSE, &Period);
}
diff --git
a/subsystems/win/basesrv/dosdev.c
b/subsystems/win/basesrv/dosdev.c
index
83a0124
..
958dcec
100644
(file)
--- a/
subsystems/win/basesrv/dosdev.c
+++ b/
subsystems/win/basesrv/dosdev.c
@@
-809,7
+809,7
@@
CSR_API(BaseSrvDefineDosDevice)
/* There's a target provided - new device, update buffer */
else
{
/* There's a target provided - new device, update buffer */
else
{
- RtlInitUnicodeString(&LinkTarget,
&CurrentBuffer[-TargetLength - 1]
);
+ RtlInitUnicodeString(&LinkTarget,
CurrentBuffer - TargetLength - 1
);
}
/*
}
/*
diff --git
a/win32ss/drivers/font/bmfd/bmfd.h
b/win32ss/drivers/font/bmfd/bmfd.h
index
58aedb2
..
d1d954a
100644
(file)
--- a/
win32ss/drivers/font/bmfd/bmfd.h
+++ b/
win32ss/drivers/font/bmfd/bmfd.h
@@
-244,8
+244,8
@@
typedef struct
{
FONTOBJ *pfo;
PBMFD_FACE pface;
{
FONTOBJ *pfo;
PBMFD_FACE pface;
-
U
LONG xScale;
-
U
LONG yScale;
+ LONG xScale;
+ LONG yScale;
ULONG ulAngle;
} BMFD_FONT, *PBMFD_FONT;
ULONG ulAngle;
} BMFD_FONT, *PBMFD_FONT;
diff --git
a/win32ss/drivers/font/bmfd/glyph.c
b/win32ss/drivers/font/bmfd/glyph.c
index
ebc5f06
..
ddbcecf
100644
(file)
--- a/
win32ss/drivers/font/bmfd/glyph.c
+++ b/
win32ss/drivers/font/bmfd/glyph.c
@@
-83,7
+83,7
@@
BmfdQueryGlyphAndBitmap(
PGLYPHENTRY pge;
ULONG xSrc, ySrc, cxSrc, cySrc;
ULONG xDst, yDst, cxDst, cyDst;
PGLYPHENTRY pge;
ULONG xSrc, ySrc, cxSrc, cySrc;
ULONG xDst, yDst, cxDst, cyDst;
-
U
LONG xScale, yScale;
+ LONG xScale, yScale;
ULONG ulGlyphOffset, cjDstRow, color;
PVOID pvSrc0, pvDst0;
ULONG ulGlyphOffset, cjDstRow, color;
PVOID pvSrc0, pvDst0;
diff --git
a/win32ss/user/ntuser/menu.c
b/win32ss/user/ntuser/menu.c
index
5e48e5a
..
97e1fa2
100644
(file)
--- a/
win32ss/user/ntuser/menu.c
+++ b/
win32ss/user/ntuser/menu.c
@@
-1752,7
+1752,7
@@
static void FASTCALL MENU_DrawBitmapItem(HDC hdc, PITEM lpitem, const RECT *rect
drawItem.itemData = lpitem->dwItemData;
/* some applications make this assumption on the DC's origin */
GreSetViewportOrgEx( hdc, lpitem->xItem, lpitem->yItem, &origorg);
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;
co_IntSendMessage( UserHMGetHandle(WndOwner), WM_DRAWITEM, 0, (LPARAM)&drawItem);
GreSetViewportOrgEx( hdc, origorg.x, origorg.y, NULL);
return;