Skip to content

Commit

Permalink
Fix W4 warnings in C version of the driver. Add /W4 /WX for C compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
SergiusTheBest committed Feb 15, 2018
1 parent deaccfe commit d0e402d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions samples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ project(FindWdk)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /WX")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /WX")

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake")
find_package(WDK REQUIRED)
Expand Down
4 changes: 4 additions & 0 deletions samples/WdmDriver/Main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
DRIVER_UNLOAD driverUnload;
VOID driverUnload(_In_ PDRIVER_OBJECT driverObject)
{
UNREFERENCED_PARAMETER(driverObject);

DbgPrint("Driver unloaded\n");
}

DRIVER_INITIALIZE DriverEntry;
NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT driverObject, _In_ PUNICODE_STRING registryPath)
{
UNREFERENCED_PARAMETER(registryPath);

DbgPrint("Driver loaded\n");
DbgPrint("The answer is %wZ\n", getAnswer());

Expand Down

0 comments on commit d0e402d

Please sign in to comment.