From 8b8b4ef50d3a2bed5215e24c6a8831e5b475f96e Mon Sep 17 00:00:00 2001 From: Luis Michaelis Date: Mon, 29 Apr 2024 15:48:37 +0200 Subject: [PATCH] fix(build): disable `-Wconversion` to make compilation easier --- src/Performance.c | 2 +- support/BuildSupport.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Performance.c b/src/Performance.c index a3d7d44..713f748 100644 --- a/src/Performance.c +++ b/src/Performance.c @@ -417,7 +417,7 @@ static float lerp(float x, float start, float end) { // See https://documentation.help/DirectMusic/dmusiostylenote.htm static uint32_t DmPerformance_convertIoTimeRange(uint8_t range) { uint32_t result = 0; - if (0 <= range && range <= 190) { + if (range <= 190) { result = range; } else if (191 <= range && range <= 212) { result = ((range - 190) * 5) + 190; diff --git a/support/BuildSupport.cmake b/support/BuildSupport.cmake index a751d31..e3efab7 100644 --- a/support/BuildSupport.cmake +++ b/support/BuildSupport.cmake @@ -58,7 +58,7 @@ endfunction() ## COMPILE(list): A list containing the compiler play_mode_flags ## LINK(list): A list containing the linker play_mode_flags function(bs_internal_select_cflags_gcc SANITIZERS COMPILE LINK) - list(APPEND _INTERNAL_FLAGS "-Wall" "-Wextra" "-Werror" "-Wconversion" "-Wshadow" "-Wpedantic" "-fPIC" "-flto") + list(APPEND _INTERNAL_FLAGS "-Wall" "-Wextra" "-Werror" "-Wshadow" "-Wpedantic" "-fPIC" "-flto") if (CMAKE_BUILD_TYPE MATCHES "^Debug" AND ${SANITIZERS} AND NOT WIN32) list(APPEND _INTERNAL_FLAGS "-fsanitize=address" "-fsanitize=undefined" "-fsanitize=leak")