* Comment out some unused but set variables, remove some others.

svn path=/trunk/; revision=53681
This commit is contained in:
Amine Khaldi 2011-09-11 00:40:20 +00:00
parent 4e616754a5
commit 0864fd08d6
20 changed files with 89 additions and 103 deletions

View file

@ -912,8 +912,8 @@ CreateMainWindow(LPCTSTR lpCaption,
Info); Info);
if (hMainWnd == NULL) if (hMainWnd == NULL)
{ {
int ret; //int ret;
ret = GetLastError(); //ret = GetLastError();
GetError(); GetError();
HeapFree(ProcessHeap, HeapFree(ProcessHeap,
0, 0,

View file

@ -410,7 +410,7 @@ void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
void Graph_DrawMemUsageHistoryGraph(HDC hDC, HWND hWnd) void Graph_DrawMemUsageHistoryGraph(HDC hDC, HWND hWnd)
{ {
RECT rcClient; RECT rcClient;
ULONGLONG CommitChargeLimit; //ULONGLONG CommitChargeLimit;
int i; int i;
static int offset = 0; static int offset = 0;
@ -430,7 +430,7 @@ void Graph_DrawMemUsageHistoryGraph(HDC hDC, HWND hWnd)
/* /*
* Get the memory usage * Get the memory usage
*/ */
CommitChargeLimit = (ULONGLONG)PerfDataGetCommitChargeLimitK(); //CommitChargeLimit = (ULONGLONG)PerfDataGetCommitChargeLimitK();
/* /*
* Draw the graph background * Draw the graph background

View file

@ -128,7 +128,6 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
RECT rc; RECT rc;
#endif #endif
LPRECT pRC; LPRECT pRC;
int idctrl;
LPNMHDR pnmh; LPNMHDR pnmh;
WINDOWPLACEMENT wp; WINDOWPLACEMENT wp;
@ -304,7 +303,6 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
break; break;
case WM_NOTIFY: case WM_NOTIFY:
idctrl = (int)wParam;
pnmh = (LPNMHDR)lParam; pnmh = (LPNMHDR)lParam;
if ((pnmh->hwndFrom == hTabWnd) && if ((pnmh->hwndFrom == hTabWnd) &&
(pnmh->idFrom == IDC_TAB) && (pnmh->idFrom == IDC_TAB) &&
@ -772,11 +770,11 @@ void SaveSettings(void)
void TaskManager_OnRestoreMainWindow(void) void TaskManager_OnRestoreMainWindow(void)
{ {
HMENU hMenu, hOptionsMenu; //HMENU hMenu, hOptionsMenu;
BOOL OnTop; BOOL OnTop;
hMenu = GetMenu(hMainWnd); //hMenu = GetMenu(hMainWnd);
hOptionsMenu = GetSubMenu(hMenu, OPTIONS_MENU_INDEX); //hOptionsMenu = GetSubMenu(hMenu, OPTIONS_MENU_INDEX);
OnTop = ((GetWindowLongPtrW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0); OnTop = ((GetWindowLongPtrW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0);
OpenIcon(hMainWnd); OpenIcon(hMainWnd);

View file

@ -88,11 +88,8 @@ DisplayAdvancedSettings(HWND hWndParent, PDISPLAY_DEVICE_ENTRY DisplayDevice)
IDataObject *pdo; IDataObject *pdo;
#ifdef _MSC_VER #ifdef _MSC_VER
HMODULE hShell32 = NULL; HMODULE hShell32 = NULL;
#endif
CPSEAE msvc_SHCreatePropSheetExtArrayEx; CPSEAE msvc_SHCreatePropSheetExtArrayEx;
#endif
/* silence gcc warning */
msvc_SHCreatePropSheetExtArrayEx = NULL;
/* FIXME: Build the "%s and %s" caption string for the monitor and adapter name */ /* FIXME: Build the "%s and %s" caption string for the monitor and adapter name */
szCaption[0] = _T('\0'); szCaption[0] = _T('\0');

View file

@ -488,7 +488,7 @@ CompBattQueryInformation(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension,
BATTERY_INFORMATION BatteryInfo; BATTERY_INFORMATION BatteryInfo;
BATTERY_REPORTING_SCALE BatteryGranularity[4]; BATTERY_REPORTING_SCALE BatteryGranularity[4];
PWCHAR BatteryName = L"Composite Battery"; PWCHAR BatteryName = L"Composite Battery";
BATTERY_MANUFACTURE_DATE Date; //BATTERY_MANUFACTURE_DATE Date;
ULONG Dummy, Time; ULONG Dummy, Time;
PVOID QueryData = NULL; PVOID QueryData = NULL;
ULONG QueryLength = 0; ULONG QueryLength = 0;
@ -557,9 +557,9 @@ CompBattQueryInformation(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension,
case BatteryManufactureDate: case BatteryManufactureDate:
/* Static data */ /* Static data */
Date.Day = 26; //Date.Day = 26;
Date.Month = 06; //Date.Month = 06;
Date.Year = 1997; //Date.Year = 1997;
break; break;
case BatteryTemperature: case BatteryTemperature:
@ -572,7 +572,6 @@ CompBattQueryInformation(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension,
break; break;
default: default:
/* Everything else is unknown */ /* Everything else is unknown */
Status = STATUS_INVALID_PARAMETER; Status = STATUS_INVALID_PARAMETER;
break; break;

View file

@ -97,7 +97,7 @@ ario_ApplyBrokenVideoHack(IN PPCI_FDO_EXTENSION FdoExtension)
{ {
PPCI_ARBITER_INSTANCE PciArbiter; PPCI_ARBITER_INSTANCE PciArbiter;
//PARBITER_INSTANCE CommonInstance; //PARBITER_INSTANCE CommonInstance;
NTSTATUS Status; //NTSTATUS Status;
/* Only valid for root FDOs who are being applied the hack for the first time */ /* Only valid for root FDOs who are being applied the hack for the first time */
ASSERT(!FdoExtension->BrokenVideoHackApplied); ASSERT(!FdoExtension->BrokenVideoHackApplied);
@ -123,7 +123,7 @@ ario_ApplyBrokenVideoHack(IN PPCI_FDO_EXTENSION FdoExtension)
NULL); NULL);
ASSERT(NT_SUCCESS(Status)); ASSERT(NT_SUCCESS(Status));
#else #else
Status = STATUS_SUCCESS; //Status = STATUS_SUCCESS;
UNIMPLEMENTED; UNIMPLEMENTED;
while (TRUE); while (TRUE);
#endif #endif

View file

@ -127,7 +127,7 @@ PciInitializeArbiterRanges(IN PPCI_FDO_EXTENSION DeviceExtension,
IN PCM_RESOURCE_LIST Resources) IN PCM_RESOURCE_LIST Resources)
{ {
PPCI_PDO_EXTENSION PdoExtension; PPCI_PDO_EXTENSION PdoExtension;
CM_RESOURCE_TYPE DesiredType; //CM_RESOURCE_TYPE DesiredType;
PVOID Instance; PVOID Instance;
PCI_SIGNATURE ArbiterType; PCI_SIGNATURE ArbiterType;
@ -162,12 +162,12 @@ PciInitializeArbiterRanges(IN PPCI_FDO_EXTENSION DeviceExtension,
if (ArbiterType == PciArb_Io) if (ArbiterType == PciArb_Io)
{ {
/* I/O Port */ /* I/O Port */
DesiredType = CmResourceTypePort; //DesiredType = CmResourceTypePort;
} }
else if (ArbiterType == PciArb_Memory) else if (ArbiterType == PciArb_Memory)
{ {
/* Device RAM */ /* Device RAM */
DesiredType = CmResourceTypeMemory; //DesiredType = CmResourceTypeMemory;
} }
else else
{ {

View file

@ -125,7 +125,8 @@ PciDebugIrpDispatchDisplay(IN PIO_STACK_LOCATION IoStackLocation,
IN USHORT MaxMinor) IN USHORT MaxMinor)
{ {
PPCI_PDO_EXTENSION PdoDeviceExtension; PPCI_PDO_EXTENSION PdoDeviceExtension;
ULONG BreakMask, DebugLevel = 0; ULONG BreakMask;
//ULONG DebugLevel = 0;
PCHAR IrpString; PCHAR IrpString;
/* Only two functions are recognized */ /* Only two functions are recognized */
@ -161,11 +162,11 @@ PciDebugIrpDispatchDisplay(IN PIO_STACK_LOCATION IoStackLocation,
/* Choose the correct debug level based on which function this is */ /* Choose the correct debug level based on which function this is */
if (IoStackLocation->MajorFunction == IRP_MJ_POWER) if (IoStackLocation->MajorFunction == IRP_MJ_POWER)
{ {
DebugLevel = 0x500; //DebugLevel = 0x500;
} }
else if (IoStackLocation->MajorFunction == IRP_MJ_PNP) else if (IoStackLocation->MajorFunction == IRP_MJ_PNP)
{ {
DebugLevel = 0x200; //DebugLevel = 0x200;
} }
/* For a PDO, print out the bus, device, and function number */ /* For a PDO, print out the bus, device, and function number */

View file

@ -680,13 +680,13 @@ NTAPI
PPBridge_ChangeResourceSettings(IN PPCI_PDO_EXTENSION PdoExtension, PPBridge_ChangeResourceSettings(IN PPCI_PDO_EXTENSION PdoExtension,
IN PPCI_COMMON_HEADER PciData) IN PPCI_COMMON_HEADER PciData)
{ {
BOOLEAN IoActive; //BOOLEAN IoActive;
PPCI_FDO_EXTENSION FdoExtension; PPCI_FDO_EXTENSION FdoExtension;
PPCI_FUNCTION_RESOURCES PciResources; PPCI_FUNCTION_RESOURCES PciResources;
ULONG i; ULONG i;
/* Check if I/O Decodes are enabled */ /* Check if I/O Decodes are enabled */
IoActive = (PciData->u.type1.IOBase & 0xF) == 1; //IoActive = (PciData->u.type1.IOBase & 0xF) == 1;
/* /*
* Check for Intel ICH PCI-to-PCI (i82801) bridges (used on the i810, * Check for Intel ICH PCI-to-PCI (i82801) bridges (used on the i810,

View file

@ -31,11 +31,11 @@ NTAPI
DxDdUnlockDirectDrawSurface(PDD_SURFACE_LOCAL pSurface) DxDdUnlockDirectDrawSurface(PDD_SURFACE_LOCAL pSurface)
{ {
BOOL retVal = FALSE; BOOL retVal = FALSE;
PEDD_SURFACE pEDDSurface = NULL; //PEDD_SURFACE pEDDSurface = NULL;
if (pSurface) if (pSurface)
{ {
pEDDSurface = (PEDD_SURFACE)( ((PBYTE)pSurface) - sizeof(DD_BASEOBJECT)); // pEDDSurface = (PEDD_SURFACE)( ((PBYTE)pSurface) - sizeof(DD_BASEOBJECT));
// InterlockedDecrement(&pEDDSurface->pobj.cExclusiveLock); // InterlockedDecrement(&pEDDSurface->pobj.cExclusiveLock);
retVal = TRUE; retVal = TRUE;
} }

View file

@ -651,16 +651,16 @@ Return Value:
HANDLE handle; HANDLE handle;
NTSTATUS status; NTSTATUS status;
PDEVICE_OBJECT deviceObject = NULL; PDEVICE_OBJECT deviceObject = NULL;
PDEVICE_OBJECT physicalDevice; //PDEVICE_OBJECT physicalDevice;
PDISK_GEOMETRY_EX diskGeometry = NULL; PDISK_GEOMETRY_EX diskGeometry = NULL;
PDEVICE_EXTENSION deviceExtension = NULL; PDEVICE_EXTENSION deviceExtension = NULL;
PDEVICE_EXTENSION physicalDeviceExtension; //PDEVICE_EXTENSION physicalDeviceExtension;
UCHAR pathId = LunInfo->PathId; UCHAR pathId = LunInfo->PathId;
UCHAR targetId = LunInfo->TargetId; UCHAR targetId = LunInfo->TargetId;
UCHAR lun = LunInfo->Lun; UCHAR lun = LunInfo->Lun;
BOOLEAN writeCache; //BOOLEAN writeCache;
PVOID senseData = NULL; PVOID senseData = NULL;
ULONG srbFlags; //ULONG srbFlags;
ULONG timeOut = 0; ULONG timeOut = 0;
BOOLEAN srbListInitialized = FALSE; BOOLEAN srbListInitialized = FALSE;
@ -822,8 +822,8 @@ Return Value:
// This is the physical device object. // This is the physical device object.
// //
physicalDevice = deviceObject; //physicalDevice = deviceObject;
physicalDeviceExtension = deviceExtension; //physicalDeviceExtension = deviceExtension;
// //
// Save address of port driver capabilities. // Save address of port driver capabilities.
@ -874,7 +874,7 @@ Return Value:
LunInfo, LunInfo,
PortCapabilities); PortCapabilities);
srbFlags = deviceExtension->SrbFlags; //srbFlags = deviceExtension->SrbFlags;
// //
// Allocate buffer for drive geometry. // Allocate buffer for drive geometry.
@ -966,7 +966,7 @@ Return Value:
DisableWriteCache(deviceObject,LunInfo); DisableWriteCache(deviceObject,LunInfo);
writeCache = deviceExtension->DeviceFlags & DEV_WRITE_CACHE; //writeCache = deviceExtension->DeviceFlags & DEV_WRITE_CACHE;
// //
// NOTE: At this point one device object has been successfully created. // NOTE: At this point one device object has been successfully created.

View file

@ -403,7 +403,8 @@ RamdiskCreateDiskDevice(IN PRAMDISK_BUS_EXTENSION DeviceExtension,
IN BOOLEAN ValidateOnly, IN BOOLEAN ValidateOnly,
OUT PRAMDISK_DRIVE_EXTENSION *NewDriveExtension) OUT PRAMDISK_DRIVE_EXTENSION *NewDriveExtension)
{ {
ULONG BasePage, ViewCount, DiskType, Length; ULONG BasePage, DiskType, Length;
//ULONG ViewCount;
NTSTATUS Status; NTSTATUS Status;
PDEVICE_OBJECT DeviceObject; PDEVICE_OBJECT DeviceObject;
PRAMDISK_DRIVE_EXTENSION DriveExtension; PRAMDISK_DRIVE_EXTENSION DriveExtension;
@ -456,11 +457,11 @@ RamdiskCreateDiskDevice(IN PRAMDISK_BUS_EXTENSION DeviceExtension,
// //
return STATUS_INVALID_PARAMETER; return STATUS_INVALID_PARAMETER;
} }
// //
// Read the view count instead // Read the view count instead
// //
ViewCount = Input->ViewCount; //ViewCount = Input->ViewCount;
// //
// Sanitize disk options // Sanitize disk options
@ -1288,11 +1289,11 @@ RamdiskReadWrite(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp) IN PIRP Irp)
{ {
PRAMDISK_DRIVE_EXTENSION DeviceExtension; PRAMDISK_DRIVE_EXTENSION DeviceExtension;
ULONG Length; //ULONG Length;
LARGE_INTEGER ByteOffset; //LARGE_INTEGER ByteOffset;
PIO_STACK_LOCATION IoStackLocation; PIO_STACK_LOCATION IoStackLocation;
NTSTATUS Status, ReturnStatus; NTSTATUS Status, ReturnStatus;
// //
// Get the device extension and make sure this isn't a bus // Get the device extension and make sure this isn't a bus
// //
@ -1310,8 +1311,8 @@ RamdiskReadWrite(IN PDEVICE_OBJECT DeviceObject,
// Capture parameters // Capture parameters
// //
IoStackLocation = IoGetCurrentIrpStackLocation(Irp); IoStackLocation = IoGetCurrentIrpStackLocation(Irp);
Length = IoStackLocation->Parameters.Read.Length; //Length = IoStackLocation->Parameters.Read.Length;
ByteOffset = IoStackLocation->Parameters.Read.ByteOffset; //ByteOffset = IoStackLocation->Parameters.Read.ByteOffset;
// //
// FIXME: Validate offset // FIXME: Validate offset

View file

@ -1836,13 +1836,11 @@ ScsiPortLogError(IN PVOID HwDeviceExtension,
IN ULONG ErrorCode, IN ULONG ErrorCode,
IN ULONG UniqueId) IN ULONG UniqueId)
{ {
PSCSI_PORT_DEVICE_EXTENSION DeviceExtension; //PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
DPRINT1("ScsiPortLogError() called\n"); DPRINT1("ScsiPortLogError() called\n");
DeviceExtension = CONTAINING_RECORD(HwDeviceExtension, //DeviceExtension = CONTAINING_RECORD(HwDeviceExtension, SCSI_PORT_DEVICE_EXTENSION, MiniPortDeviceExtension);
SCSI_PORT_DEVICE_EXTENSION,
MiniPortDeviceExtension);
DPRINT("ScsiPortLogError() done\n"); DPRINT("ScsiPortLogError() done\n");
@ -4209,7 +4207,7 @@ SpiProcessCompletedRequest(IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension,
PSCSI_PORT_LUN_EXTENSION LunExtension; PSCSI_PORT_LUN_EXTENSION LunExtension;
LONG Result; LONG Result;
PIRP Irp; PIRP Irp;
ULONG SequenceNumber; //ULONG SequenceNumber;
Srb = SrbInfo->Srb; Srb = SrbInfo->Srb;
Irp = Srb->OriginalRequest; Irp = Srb->OriginalRequest;
@ -4309,7 +4307,7 @@ SpiProcessCompletedRequest(IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension,
/* Save transfer length in the IRP */ /* Save transfer length in the IRP */
Irp->IoStatus.Information = Srb->DataTransferLength; Irp->IoStatus.Information = Srb->DataTransferLength;
SequenceNumber = SrbInfo->SequenceNumber; //SequenceNumber = SrbInfo->SequenceNumber;
SrbInfo->SequenceNumber = 0; SrbInfo->SequenceNumber = 0;
/* Decrement the queue count */ /* Decrement the queue count */
@ -4577,7 +4575,6 @@ ScsiPortIsr(IN PKINTERRUPT Interrupt,
IN PVOID ServiceContext) IN PVOID ServiceContext)
{ {
PSCSI_PORT_DEVICE_EXTENSION DeviceExtension; PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
BOOLEAN Result;
DPRINT("ScsiPortIsr() called!\n"); DPRINT("ScsiPortIsr() called!\n");
@ -4588,7 +4585,7 @@ ScsiPortIsr(IN PKINTERRUPT Interrupt,
return FALSE; return FALSE;
/* Call miniport's HwInterrupt routine */ /* Call miniport's HwInterrupt routine */
Result = DeviceExtension->HwInterrupt(&DeviceExtension->MiniPortDeviceExtension); DeviceExtension->HwInterrupt(&DeviceExtension->MiniPortDeviceExtension);
/* If flag of notification is set - queue a DPC */ /* If flag of notification is set - queue a DPC */
if (DeviceExtension->InterruptData.Flags & SCSI_PORT_NOTIFICATION_NEEDED) if (DeviceExtension->InterruptData.Flags & SCSI_PORT_NOTIFICATION_NEEDED)

View file

@ -86,7 +86,7 @@ VGAtoDIB(
UCHAR *GDIpos, *initial; UCHAR *GDIpos, *initial;
/* Used by the temporary DFB */ /* Used by the temporary DFB */
DEVSURF DestDevSurf; //DEVSURF DestDevSurf;
/* FIXME: Optimize to retrieve entire bytes at a time (see ../vgavideo/vgavideo.c:vgaGetByte) */ /* FIXME: Optimize to retrieve entire bytes at a time (see ../vgavideo/vgavideo.c:vgaGetByte) */
@ -97,11 +97,10 @@ VGAtoDIB(
if (ColorTranslation == NULL) if (ColorTranslation == NULL)
{ {
/* Prepare a Dest Dev Target and copy from the DFB to the DIB */ /* Prepare a Dest Dev Target and copy from the DFB to the DIB */
DestDevSurf.NextScan = Dest->lDelta; //DestDevSurf.NextScan = Dest->lDelta;
DestDevSurf.StartBmp = Dest->pvScan0; //DestDevSurf.StartBmp = Dest->pvScan0;
DIB_BltFromVGA(SourcePoint->x, SourcePoint->y, dx, dy, Dest->pvScan0, Dest->lDelta); DIB_BltFromVGA(SourcePoint->x, SourcePoint->y, dx, dy, Dest->pvScan0, Dest->lDelta);
} }
else else
{ {

View file

@ -11,11 +11,10 @@
BOOL VGADDIFillSolid(SURFOBJ *Surface, RECTL Dimensions, ULONG iColor) BOOL VGADDIFillSolid(SURFOBJ *Surface, RECTL Dimensions, ULONG iColor)
{ {
int x, y, x2, y2, w, h, j; int x, y, x2, y2, w, h, j;
ULONG offset, pre1; ULONG orgx, pre1, midpre1, tmppre1;
ULONG orgpre1, orgx, midpre1, tmppre1; //ULONG offset, orgpre1;
int ileftpix, imidpix, irightpix; int ileftpix, imidpix, irightpix;
/* double leftpix, midpix, rightpix;*/ /* double leftpix, midpix, rightpix;*/
UCHAR a;
/* Swap dimensions so that x, y are at topmost left */ /* Swap dimensions so that x, y are at topmost left */
if ( Dimensions.right < Dimensions.left ) if ( Dimensions.right < Dimensions.left )
@ -46,7 +45,7 @@ BOOL VGADDIFillSolid(SURFOBJ *Surface, RECTL Dimensions, ULONG iColor)
DPRINT("VGADDIFillSolid: x:%d, y:%d, w:%d, h:%d\n", x, y, w, h); DPRINT("VGADDIFillSolid: x:%d, y:%d, w:%d, h:%d\n", x, y, w, h);
/* Calculate the starting offset */ /* Calculate the starting offset */
offset = xconv[x]+y80[y]; //offset = xconv[x]+y80[y];
/* Make a note of original x */ /* Make a note of original x */
orgx = x; orgx = x;
@ -57,7 +56,7 @@ BOOL VGADDIFillSolid(SURFOBJ *Surface, RECTL Dimensions, ULONG iColor)
imidpix = (w-ileftpix-irightpix) / 8; imidpix = (w-ileftpix-irightpix) / 8;
pre1 = xconv[(x-1)&~7] + y80[y]; pre1 = xconv[(x-1)&~7] + y80[y];
orgpre1=pre1; //orgpre1=pre1;
/* check for overlap ( very horizontally skinny rect ) */ /* check for overlap ( very horizontally skinny rect ) */
if ( (ileftpix+irightpix) > w ) if ( (ileftpix+irightpix) > w )
@ -70,7 +69,7 @@ BOOL VGADDIFillSolid(SURFOBJ *Surface, RECTL Dimensions, ULONG iColor)
tmppre1 = pre1; tmppre1 = pre1;
for ( j = y; j < y+h; j++ ) for ( j = y; j < y+h; j++ )
{ {
a = READ_REGISTER_UCHAR ( vidmem+tmppre1 ); READ_REGISTER_UCHAR ( vidmem+tmppre1 );
WRITE_REGISTER_UCHAR ( vidmem+tmppre1, iColor ); WRITE_REGISTER_UCHAR ( vidmem+tmppre1, iColor );
tmppre1 += 80; tmppre1 += 80;
} }
@ -86,7 +85,7 @@ BOOL VGADDIFillSolid(SURFOBJ *Surface, RECTL Dimensions, ULONG iColor)
tmppre1 = pre1; tmppre1 = pre1;
for ( j = y; j < y+h; j++ ) for ( j = y; j < y+h; j++ )
{ {
a = READ_REGISTER_UCHAR(vidmem + tmppre1); READ_REGISTER_UCHAR(vidmem + tmppre1);
WRITE_REGISTER_UCHAR(vidmem + tmppre1, iColor); WRITE_REGISTER_UCHAR(vidmem + tmppre1, iColor);
tmppre1 += 80; tmppre1 += 80;
} }
@ -120,7 +119,7 @@ BOOL VGADDIFillSolid(SURFOBJ *Surface, RECTL Dimensions, ULONG iColor)
for ( j = y; j < y+h; j++ ) for ( j = y; j < y+h; j++ )
{ {
a = READ_REGISTER_UCHAR(vidmem + pre1); READ_REGISTER_UCHAR(vidmem + pre1);
WRITE_REGISTER_UCHAR(vidmem + pre1, iColor); WRITE_REGISTER_UCHAR(vidmem + pre1, iColor);
pre1 += 80; pre1 += 80;
} }

View file

@ -163,14 +163,13 @@ get_masks(int x, int w)
VOID vgaPutPixel(INT x, INT y, UCHAR c) VOID vgaPutPixel(INT x, INT y, UCHAR c)
{ {
ULONG offset; ULONG offset;
UCHAR a;
offset = xconv[x]+y80[y]; offset = xconv[x]+y80[y];
WRITE_PORT_UCHAR((PUCHAR)GRA_I,0x08); WRITE_PORT_UCHAR((PUCHAR)GRA_I,0x08);
WRITE_PORT_UCHAR((PUCHAR)GRA_D,maskbit[x]); WRITE_PORT_UCHAR((PUCHAR)GRA_D,maskbit[x]);
a = READ_REGISTER_UCHAR(vidmem + offset); READ_REGISTER_UCHAR(vidmem + offset);
WRITE_REGISTER_UCHAR(vidmem + offset, c); WRITE_REGISTER_UCHAR(vidmem + offset, c);
} }
@ -231,9 +230,8 @@ INT vgaGetPixel(
BOOL vgaHLine(INT x, INT y, INT len, UCHAR c) BOOL vgaHLine(INT x, INT y, INT len, UCHAR c)
{ {
UCHAR a; ULONG orgx, pre1, midpre1;
ULONG pre1; //ULONG orgpre1;
ULONG orgpre1, orgx, midpre1;
LONG ileftpix, imidpix, irightpix; LONG ileftpix, imidpix, irightpix;
orgx = x; orgx = x;
@ -252,7 +250,7 @@ BOOL vgaHLine(INT x, INT y, INT len, UCHAR c)
imidpix = (len-ileftpix-irightpix) / 8; imidpix = (len-ileftpix-irightpix) / 8;
pre1 = xconv[(x-1)&~7] + y80[y]; pre1 = xconv[(x-1)&~7] + y80[y];
orgpre1=pre1; //orgpre1=pre1;
/* check for overlap ( very short line ) */ /* check for overlap ( very short line ) */
if ( (ileftpix+irightpix) > len ) if ( (ileftpix+irightpix) > len )
@ -262,7 +260,7 @@ BOOL vgaHLine(INT x, INT y, INT len, UCHAR c)
WRITE_PORT_UCHAR((PUCHAR)GRA_I,0x08); // set the mask WRITE_PORT_UCHAR((PUCHAR)GRA_I,0x08); // set the mask
WRITE_PORT_UCHAR((PUCHAR)GRA_D,mask); WRITE_PORT_UCHAR((PUCHAR)GRA_D,mask);
a = READ_REGISTER_UCHAR(vidmem + pre1); READ_REGISTER_UCHAR(vidmem + pre1);
WRITE_REGISTER_UCHAR(vidmem + pre1, c); WRITE_REGISTER_UCHAR(vidmem + pre1, c);
return TRUE; return TRUE;
@ -275,7 +273,7 @@ BOOL vgaHLine(INT x, INT y, INT len, UCHAR c)
WRITE_PORT_UCHAR((PUCHAR)GRA_I,0x08); // set the mask WRITE_PORT_UCHAR((PUCHAR)GRA_I,0x08); // set the mask
WRITE_PORT_UCHAR((PUCHAR)GRA_D,startmasks[ileftpix]); WRITE_PORT_UCHAR((PUCHAR)GRA_D,startmasks[ileftpix]);
a = READ_REGISTER_UCHAR(vidmem + pre1); READ_REGISTER_UCHAR(vidmem + pre1);
WRITE_REGISTER_UCHAR(vidmem + pre1, c); WRITE_REGISTER_UCHAR(vidmem + pre1, c);
/* Prepare new x for the middle */ /* Prepare new x for the middle */
@ -300,7 +298,7 @@ BOOL vgaHLine(INT x, INT y, INT len, UCHAR c)
/* Write right pixels */ /* Write right pixels */
WRITE_PORT_UCHAR((PUCHAR)GRA_I,0x08); // set the mask bits WRITE_PORT_UCHAR((PUCHAR)GRA_I,0x08); // set the mask bits
WRITE_PORT_UCHAR((PUCHAR)GRA_D, endmasks[irightpix]); WRITE_PORT_UCHAR((PUCHAR)GRA_D, endmasks[irightpix]);
a = READ_REGISTER_UCHAR(vidmem + pre1); READ_REGISTER_UCHAR(vidmem + pre1);
WRITE_REGISTER_UCHAR(vidmem + pre1, c); WRITE_REGISTER_UCHAR(vidmem + pre1, c);
} }
@ -310,7 +308,6 @@ BOOL vgaHLine(INT x, INT y, INT len, UCHAR c)
BOOL vgaVLine(INT x, INT y, INT len, UCHAR c) BOOL vgaVLine(INT x, INT y, INT len, UCHAR c)
{ {
INT offset, i; INT offset, i;
UCHAR a;
offset = xconv[x]+y80[y]; offset = xconv[x]+y80[y];
@ -323,7 +320,7 @@ BOOL vgaVLine(INT x, INT y, INT len, UCHAR c)
for(i=y; i<y+len; i++) for(i=y; i<y+len; i++)
{ {
a = READ_REGISTER_UCHAR(vidmem + offset); READ_REGISTER_UCHAR(vidmem + offset);
WRITE_REGISTER_UCHAR(vidmem + offset, c); WRITE_REGISTER_UCHAR(vidmem + offset, c);
offset += 80; offset += 80;
} }
@ -453,7 +450,6 @@ void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, int St
LONG x2 = x + w; LONG x2 = x + w;
LONG y2 = y + h; LONG y2 = y + h;
ULONG offset; ULONG offset;
UCHAR a;
for (i = x; i < x2; i++) for (i = x; i < x2; i++)
{ {
@ -467,7 +463,7 @@ void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, int St
{ {
for (j = y; j < y2; j++) for (j = y; j < y2; j++)
{ {
a = READ_REGISTER_UCHAR(vidmem + offset); READ_REGISTER_UCHAR(vidmem + offset);
WRITE_REGISTER_UCHAR(vidmem + offset, (*pb & 0xf0) >> 4); WRITE_REGISTER_UCHAR(vidmem + offset, (*pb & 0xf0) >> 4);
offset += 80; offset += 80;
pb += Source_lDelta; pb += Source_lDelta;
@ -477,7 +473,7 @@ void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, int St
{ {
for (j = y; j < y2; j++) for (j = y; j < y2; j++)
{ {
a = READ_REGISTER_UCHAR(vidmem + offset); READ_REGISTER_UCHAR(vidmem + offset);
WRITE_REGISTER_UCHAR(vidmem + offset, *pb & 0x0f); WRITE_REGISTER_UCHAR(vidmem + offset, *pb & 0x0f);
offset += 80; offset += 80;
pb += Source_lDelta; pb += Source_lDelta;
@ -498,7 +494,6 @@ void DIB_BltToVGAWithXlate(int x, int y, int w, int h, void *b, int Source_lDelt
ULONG x2 = x + w; ULONG x2 = x + w;
ULONG y2 = y + h; ULONG y2 = y + h;
ULONG offset; ULONG offset;
UCHAR a;
for (i = x; i < x2; i++) for (i = x; i < x2; i++)
{ {
@ -512,7 +507,7 @@ void DIB_BltToVGAWithXlate(int x, int y, int w, int h, void *b, int Source_lDelt
{ {
for (j = y; j < y2; j++) for (j = y; j < y2; j++)
{ {
a = READ_REGISTER_UCHAR(vidmem + offset); READ_REGISTER_UCHAR(vidmem + offset);
WRITE_REGISTER_UCHAR(vidmem + offset, XLATEOBJ_iXlate(Xlate, (*pb & 0xf0) >> 4)); WRITE_REGISTER_UCHAR(vidmem + offset, XLATEOBJ_iXlate(Xlate, (*pb & 0xf0) >> 4));
offset += 80; offset += 80;
pb += Source_lDelta; pb += Source_lDelta;
@ -522,7 +517,7 @@ void DIB_BltToVGAWithXlate(int x, int y, int w, int h, void *b, int Source_lDelt
{ {
for (j = y; j < y2; j++) for (j = y; j < y2; j++)
{ {
a = READ_REGISTER_UCHAR(vidmem + offset); READ_REGISTER_UCHAR(vidmem + offset);
WRITE_REGISTER_UCHAR(vidmem + offset, XLATEOBJ_iXlate(Xlate, *pb & 0x0f)); WRITE_REGISTER_UCHAR(vidmem + offset, XLATEOBJ_iXlate(Xlate, *pb & 0x0f));
offset += 80; offset += 80;
pb += Source_lDelta; pb += Source_lDelta;
@ -660,15 +655,15 @@ vgaWriteScan ( int x, int y, int w, void *b )
{ {
unsigned char *bp; unsigned char *bp;
unsigned char *vp; unsigned char *vp;
unsigned char init_mask; //unsigned char init_mask;
volatile unsigned char dummy; volatile unsigned char dummy;
int byte_per_line; //int byte_per_line;
int i, j, off, init_off = x&7; int i, j, off, init_off = x&7;
bp = b; bp = b;
ASSIGNVP4(x, y, vp) ASSIGNVP4(x, y, vp)
ASSIGNMK4(x, y, init_mask) //ASSIGNMK4(x, y, init_mask)
byte_per_line = SCREEN_X >> 3; //byte_per_line = SCREEN_X >> 3;
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x05); // write mode 2 WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x05); // write mode 2
WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x02); WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x02);
@ -795,7 +790,7 @@ void DFB_BltToVGA(int x, int y, int w, int h, void *b, int bw)
unsigned char *bp, *bpX; unsigned char *bp, *bpX;
unsigned char *vp, *vpX; unsigned char *vp, *vpX;
unsigned char mask; unsigned char mask;
volatile unsigned char dummy; //volatile unsigned char dummy;
int byte_per_line; int byte_per_line;
int i, j; int i, j;
@ -817,7 +812,7 @@ void DFB_BltToVGA(int x, int y, int w, int h, void *b, int bw)
vp = vpX; vp = vpX;
for (j = h; j > 0; j--) for (j = h; j > 0; j--)
{ {
dummy = *vp; //dummy = *vp;
*vp = *bp; *vp = *bp;
bp += bw; bp += bw;
vp += byte_per_line; vp += byte_per_line;
@ -838,7 +833,7 @@ void DFB_BltToVGA_Transparent(int x, int y, int w, int h, void *b, int bw, char
unsigned char *bp, *bpX; unsigned char *bp, *bpX;
unsigned char *vp, *vpX; unsigned char *vp, *vpX;
unsigned char mask; unsigned char mask;
volatile unsigned char dummy; //volatile unsigned char dummy;
int byte_per_line; int byte_per_line;
int i, j; int i, j;
@ -862,7 +857,7 @@ void DFB_BltToVGA_Transparent(int x, int y, int w, int h, void *b, int bw, char
{ {
if (*bp != Trans) if (*bp != Trans)
{ {
dummy = *vp; //dummy = *vp;
*vp = *bp; *vp = *bp;
} }
bp += bw; bp += bw;

View file

@ -282,12 +282,12 @@ NTAPI
HalpQueryCapabilities(IN PDEVICE_OBJECT DeviceObject, HalpQueryCapabilities(IN PDEVICE_OBJECT DeviceObject,
OUT PDEVICE_CAPABILITIES Capabilities) OUT PDEVICE_CAPABILITIES Capabilities)
{ {
PPDO_EXTENSION PdoExtension; //PPDO_EXTENSION PdoExtension;
NTSTATUS Status; NTSTATUS Status;
PAGED_CODE(); PAGED_CODE();
/* Get the extension and check for valid version */ /* Get the extension and check for valid version */
PdoExtension = DeviceObject->DeviceExtension; //PdoExtension = DeviceObject->DeviceExtension;
ASSERT(Capabilities->Version == 1); ASSERT(Capabilities->Version == 1);
if (Capabilities->Version == 1) if (Capabilities->Version == 1)
{ {
@ -619,7 +619,7 @@ HalpDispatchPnp(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp) IN PIRP Irp)
{ {
PIO_STACK_LOCATION IoStackLocation; PIO_STACK_LOCATION IoStackLocation;
PPDO_EXTENSION PdoExtension; //PPDO_EXTENSION PdoExtension;
PFDO_EXTENSION FdoExtension; PFDO_EXTENSION FdoExtension;
NTSTATUS Status; NTSTATUS Status;
UCHAR Minor; UCHAR Minor;
@ -691,8 +691,7 @@ HalpDispatchPnp(IN PDEVICE_OBJECT DeviceObject,
{ {
/* This is a PDO instead */ /* This is a PDO instead */
ASSERT(FdoExtension->ExtensionType == PdoExtensionType); ASSERT(FdoExtension->ExtensionType == PdoExtensionType);
PdoExtension = (PPDO_EXTENSION)FdoExtension; //PdoExtension = (PPDO_EXTENSION)FdoExtension;
/* Query the IRP type */ /* Query the IRP type */
Status = STATUS_SUCCESS; Status = STATUS_SUCCESS;
switch (Minor) switch (Minor)

View file

@ -311,7 +311,7 @@ HalpValidPCISlot(IN PBUS_HANDLER BusHandler,
PCI_SLOT_NUMBER MultiSlot; PCI_SLOT_NUMBER MultiSlot;
PPCIPBUSDATA BusData = (PPCIPBUSDATA)BusHandler->BusData; PPCIPBUSDATA BusData = (PPCIPBUSDATA)BusHandler->BusData;
UCHAR HeaderType; UCHAR HeaderType;
ULONG Device; //ULONG Device;
/* Simple validation */ /* Simple validation */
if (Slot.u.bits.Reserved) return FALSE; if (Slot.u.bits.Reserved) return FALSE;
@ -321,7 +321,7 @@ HalpValidPCISlot(IN PBUS_HANDLER BusHandler,
if (!Slot.u.bits.FunctionNumber) return TRUE; if (!Slot.u.bits.FunctionNumber) return TRUE;
/* Functions 0+ need Multi-Function support, so check the slot */ /* Functions 0+ need Multi-Function support, so check the slot */
Device = Slot.u.bits.DeviceNumber; //Device = Slot.u.bits.DeviceNumber;
MultiSlot = Slot; MultiSlot = Slot;
MultiSlot.u.bits.FunctionNumber = 0; MultiSlot.u.bits.FunctionNumber = 0;

View file

@ -2825,10 +2825,11 @@ PRTL_ACTIVATION_CONTEXT_STACK_FRAME
FASTCALL FASTCALL
RtlDeactivateActivationContextUnsafeFast(IN PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame) RtlDeactivateActivationContextUnsafeFast(IN PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame)
{ {
RTL_ACTIVATION_CONTEXT_STACK_FRAME *frame, *top; RTL_ACTIVATION_CONTEXT_STACK_FRAME *frame;
//RTL_ACTIVATION_CONTEXT_STACK_FRAME *top;
/* find the right frame */ /* find the right frame */
top = NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame; //top = NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame;
frame = &Frame->Frame; frame = &Frame->Frame;
if (!frame) if (!frame)

View file

@ -57,7 +57,7 @@ RtlAddRange (IN OUT PRTL_RANGE_LIST RangeList,
IN PVOID Owner OPTIONAL) IN PVOID Owner OPTIONAL)
{ {
PRTL_RANGE_ENTRY RangeEntry; PRTL_RANGE_ENTRY RangeEntry;
PRTL_RANGE_ENTRY Previous; //PRTL_RANGE_ENTRY Previous;
PRTL_RANGE_ENTRY Current; PRTL_RANGE_ENTRY Current;
PLIST_ENTRY Entry; PLIST_ENTRY Entry;
@ -91,7 +91,7 @@ RtlAddRange (IN OUT PRTL_RANGE_LIST RangeList,
} }
else else
{ {
Previous = NULL; //Previous = NULL;
Entry = RangeList->ListHead.Flink; Entry = RangeList->ListHead.Flink;
while (Entry != &RangeList->ListHead) while (Entry != &RangeList->ListHead)
{ {
@ -108,7 +108,7 @@ RtlAddRange (IN OUT PRTL_RANGE_LIST RangeList,
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
Previous = Current; //Previous = Current;
Entry = Entry->Flink; Entry = Entry->Flink;
} }