diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-04-26 18:42:37 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-04-26 18:42:37 +0300 |
commit | 85e289ebf0e37f2233050ea3b975b83fcce83c0a (patch) | |
tree | ccaab7582fe64312b443dcd795df6839b23b109d /src/sysenter | |
parent | fix licensing notices (diff) | |
download | windows7-drivers-85e289ebf0e37f2233050ea3b975b83fcce83c0a.tar.gz windows7-drivers-85e289ebf0e37f2233050ea3b975b83fcce83c0a.zip |
fix compiler warnings
Diffstat (limited to 'src/sysenter')
-rw-r--r-- | src/sysenter/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sysenter/main.c b/src/sysenter/main.c index 58ecddb..9eb9b28 100644 --- a/src/sysenter/main.c +++ b/src/sysenter/main.c @@ -56,7 +56,10 @@ static void hook_sysenter() */ old_msr_value = __readmsr(IA32_SYSENTER_EIP); +#pragma warning(push) +#pragma warning(disable: 4305) old_ki_fast_call_entry = (void *) old_msr_value; +#pragma warning(pop) __writemsr(IA32_SYSENTER_EIP, new_ki_fast_call_entry); } @@ -80,10 +83,12 @@ static void on_driver_unload(DRIVER_OBJECT *driver_object) KTIMER timer; LARGE_INTEGER time_out; + UNREFERENCED_PARAMETER(driver_object); + unhook_sysenter(); KeInitializeTimer(&timer); - time_out.QuadPart = -30000000; // 3 sec + time_out.QuadPart = -30000000; KeSetTimer(&timer, time_out, NULL); KeWaitForSingleObject(&timer, Executive, KernelMode, FALSE, NULL); @@ -93,6 +98,8 @@ NTSTATUS DriverEntry( DRIVER_OBJECT *driver_object, UNICODE_STRING *registry_path) { + UNREFERENCED_PARAMETER(registry_path); + driver_object->DriverUnload = on_driver_unload; hook_sysenter(); return STATUS_SUCCESS; |