Skip to content

Commit

Permalink
Ignore VC warning
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Feb 7, 2024
1 parent 4e17513 commit 277c075
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions glm/ext/scalar_ulp.inl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#if GLM_COMPILER & GLM_COMPILER_VC
# pragma warning(push)
# pragma warning(disable : 4127)
# pragma warning(disable : 4365) // '=': signed/unsigned mismatch
#elif GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wsign-conversion"
Expand Down
2 changes: 1 addition & 1 deletion glm/gtc/packing.inl
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ namespace detail
detail::u9u9u9e5 Unpack;
Unpack.pack = v;

return vec3(Unpack.data.x, Unpack.data.y, Unpack.data.z) * pow(2.0f, Unpack.data.w - 15.f - 9.f);
return vec3(Unpack.data.x, Unpack.data.y, Unpack.data.z) * pow(2.0f, static_cast<float>(Unpack.data.w) - 15.f - 9.f);
}

// Based on Brian Karis http://graphicrants.blogspot.fr/2009/04/rgbm-color-encoding.html
Expand Down
4 changes: 4 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")

if(NOT GLM_DISABLE_AUTO_DETECTION)
add_compile_options(/Wall /WX)
add_compile_options(/wd4464) # warning C4464: relative include path contains '..'
add_compile_options(/wd4514) # warning C4514: unreferenced inline function has been removed
add_compile_options(/wd4365) # warning C4365: signed/unsigned mismatch
add_compile_options(/wd5045) # warning C5045: Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified
endif()
# add_compile_options(/wd4309 /wd4324 /wd4389 /wd4127 /wd4267 /wd4146 /wd4201 /wd4464 /wd4514 /wd4701 /wd4820 /wd4365)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
Expand Down

0 comments on commit 277c075

Please sign in to comment.