Fix more MSVC warnings.


svn path=/branches/ntvdm/; revision=59667
This commit is contained in:
Aleksandar Andrejevic 2013-08-07 15:42:32 +00:00
parent 5e69cb4dcb
commit bcdc670ae9
2 changed files with 8 additions and 8 deletions

View file

@ -964,7 +964,7 @@ BOOLEAN DosCreateProcess(LPCSTR CommandLine, WORD EnvBlock)
for (i = Header->e_maxalloc; i >= Header->e_minalloc; i--, ExeSize--)
{
/* Try to allocate that much memory */
Segment = DosAllocateMemory(ExeSize, NULL);
Segment = DosAllocateMemory((WORD)ExeSize, NULL);
if (Segment != 0) break;
}
@ -974,7 +974,7 @@ BOOLEAN DosCreateProcess(LPCSTR CommandLine, WORD EnvBlock)
/* Initialize the PSP */
DosInitializePsp(Segment,
CommandLine,
ExeSize,
(WORD)ExeSize,
EnvBlock);
/* The process owns its own memory */
@ -1046,7 +1046,7 @@ BOOLEAN DosCreateProcess(LPCSTR CommandLine, WORD EnvBlock)
/* Initialize the PSP */
DosInitializePsp(Segment,
CommandLine,
(FileSize + sizeof(DOS_PSP)) >> 4,
(WORD)((FileSize + sizeof(DOS_PSP)) >> 4),
EnvBlock);
/* Set the initial segment registers */
@ -1227,8 +1227,8 @@ VOID DosInt21h(LPWORD Stack)
DWORD Ecx = EmulatorGetRegister(EMULATOR_REG_CX);
DWORD Edx = EmulatorGetRegister(EMULATOR_REG_DX);
DWORD Ebx = EmulatorGetRegister(EMULATOR_REG_BX);
WORD DataSegment = EmulatorGetRegister(EMULATOR_REG_DS);
WORD ExtSegment = EmulatorGetRegister(EMULATOR_REG_ES);
WORD DataSegment = (WORD)EmulatorGetRegister(EMULATOR_REG_DS);
WORD ExtSegment = (WORD)EmulatorGetRegister(EMULATOR_REG_ES);
/* Check the value in the AH register */
switch (HIBYTE(Eax))

View file

@ -235,7 +235,7 @@ static VOID VgaEnterGraphicsMode(UINT Width, UINT Height, UINT BitDepth)
BitmapInfo->bmiHeader.biSizeImage = Width * Height * (BitDepth / 8);
/* Fill the palette data */
for (i = 0; i < BitDepth; i++) PaletteIndex[i] = i;
for (i = 0; i < BitDepth; i++) PaletteIndex[i] = (WORD)i;
/* Fill the console graphics buffer info */
GraphicsBufferInfo.dwBitMapInfoLength = VGA_BITMAP_INFO_SIZE;
@ -503,8 +503,8 @@ static VOID VgaUpdateTextCursor(VOID)
Location += (VgaCrtcRegisters[VGA_CRTC_CURSOR_END_REG] >> 5) & 3;
/* Find the coordinates of the new position */
Position.X = Location % ScanlineSize;
Position.Y = Location / ScanlineSize;
Position.X = (WORD)(Location % ScanlineSize);
Position.Y = (WORD)(Location / ScanlineSize);
/* Update the physical cursor */
SetConsoleCursorInfo(TextConsoleBuffer, &CursorInfo);