From 85e289ebf0e37f2233050ea3b975b83fcce83c0a Mon Sep 17 00:00:00 2001
From: Egor Tensin <Egor.Tensin@gmail.com>
Date: Wed, 26 Apr 2017 18:42:37 +0300
Subject: fix compiler warnings

---
 src/sysenter/main.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'src/sysenter')

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;
-- 
cgit v1.2.3