Author: aandrejevic Date: Wed Aug 7 15:42:32 2013 New Revision: 59667
URL: http://svn.reactos.org/svn/reactos?rev=59667&view=rev Log: [NTVDM] Fix more MSVC warnings.
Modified: branches/ntvdm/subsystems/ntvdm/dos.c branches/ntvdm/subsystems/ntvdm/vga.c
Modified: branches/ntvdm/subsystems/ntvdm/dos.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/dos.c?rev... ============================================================================== --- branches/ntvdm/subsystems/ntvdm/dos.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/dos.c [iso-8859-1] Wed Aug 7 15:42:32 2013 @@ -964,7 +964,7 @@ 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 @@ /* Initialize the PSP */ DosInitializePsp(Segment, CommandLine, - ExeSize, + (WORD)ExeSize, EnvBlock);
/* The process owns its own memory */ @@ -1046,7 +1046,7 @@ /* 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 @@ 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))
Modified: branches/ntvdm/subsystems/ntvdm/vga.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/vga.c?rev... ============================================================================== --- branches/ntvdm/subsystems/ntvdm/vga.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/vga.c [iso-8859-1] Wed Aug 7 15:42:32 2013 @@ -235,7 +235,7 @@ 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 @@ 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);