Skip to content

Commit

Permalink
Warn uninitialized local pointer on VC.
Browse files Browse the repository at this point in the history
  • Loading branch information
ranvis committed Mar 16, 2023
1 parent 2c03b6f commit 05c8d4f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmake/platforms/windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,12 @@ if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
# something _else_ const should make no difference.

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \
/w14703 \
/wd4244 /wd4267 /wd4018 /wd4146 /wd4293 /wd4090")

# Set the warning level to 1
# - 4703: Potentially uninitialized local pointer variable 'name' used

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()

Expand Down

0 comments on commit 05c8d4f

Please sign in to comment.