summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--editor/CMakeLists.txt6
-rw-r--r--shaders/lightmap.cpp2
-rw-r--r--userconfig-sthalik@Windows-MSVC.cmake3
3 files changed, 5 insertions, 6 deletions
diff --git a/editor/CMakeLists.txt b/editor/CMakeLists.txt
index 3e19248a..81afadd0 100644
--- a/editor/CMakeLists.txt
+++ b/editor/CMakeLists.txt
@@ -3,11 +3,7 @@ set(self floormat-editor)
file(GLOB sources "*.cpp" "tests/*.cpp" CONFIGURE_ARGS)
corrade_add_resource(res "../resources.conf")
-if(MSVC)
- set_property(SOURCE "${res}" APPEND PROPERTY COMPILE_OPTIONS "-W0")
-else()
- set_property(SOURCE "${res}" APPEND PROPERTY COMPILE_OPTIONS "-w")
-endif()
+set_property(SOURCE "${res}" APPEND PROPERTY COMPILE_OPTIONS "-w") # no warnings
add_library(${self}_o OBJECT "${res}" "${sources}")
target_link_libraries(${self}_o PUBLIC MagnumIntegration::ImGui fmt::fmt nlohmann_json::nlohmann_json tsl::robin_map)
diff --git a/shaders/lightmap.cpp b/shaders/lightmap.cpp
index b3cd1e60..69702624 100644
--- a/shaders/lightmap.cpp
+++ b/shaders/lightmap.cpp
@@ -225,7 +225,7 @@ void lightmap_shader::add_light(Vector2 neighbor_offset, const light_s& light)
neighbor_offset += Vector2((float)half_neighbors);
constexpr auto tile_size = TILE_SIZE2.sum()/2;
- float range;
+ float range = 0;
fm_assert(light.falloff < light_falloff::COUNT);
switch (light.falloff)
diff --git a/userconfig-sthalik@Windows-MSVC.cmake b/userconfig-sthalik@Windows-MSVC.cmake
index e2aae06c..c721de1a 100644
--- a/userconfig-sthalik@Windows-MSVC.cmake
+++ b/userconfig-sthalik@Windows-MSVC.cmake
@@ -81,6 +81,9 @@ endfunction()
function(fm-userconfig-src)
add_compile_options(-W4 -Qvec-report:1)
+ add_compile_options(
+ -wd4702 # warning C4702: unreachable code
+ )
if(MSVC_VERSION GREATER_EQUAL 1935) # 17.5 Preview
add_compile_options(-Zc:checkGwOdr)
endif()