Skip to content

Commit

Permalink
Fix msrmain.c Complie error
Browse files Browse the repository at this point in the history
When I using mymake.bat and WDK 7600.16385.1 x64 Free Build Environment
I got error 2275 in line 160.

Because can't have a variable declared in the middle of the scope.
So i modify the code.
  • Loading branch information
eastWillow authored Jan 6, 2017
1 parent 2a8f0ea commit 3f88ad5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion WinMSRDriver/Win7/msrmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ NTSTATUS deviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
ULONG inputSize = 0;
PCI_SLOT_NUMBER slot;
unsigned size = 0;
PROCESSOR_NUMBER ProcNumber;

PAGED_CODE();

Expand All @@ -157,7 +158,7 @@ NTSTATUS deviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
input_msr_req = (struct MSR_Request *)Irp->AssociatedIrp.SystemBuffer;
input_pcicfg_req = (struct PCICFG_Request *)Irp->AssociatedIrp.SystemBuffer;
output = (ULONG64 *)Irp->AssociatedIrp.SystemBuffer;
PROCESSOR_NUMBER ProcNumber;

memset(&ProcNumber, 0, sizeof(PROCESSOR_NUMBER));

switch (IrpStackLocation->Parameters.DeviceIoControl.IoControlCode)
Expand Down

0 comments on commit 3f88ad5

Please sign in to comment.