From 8fdc84d0aaec63d57203bdef4b88047479ad4fc1 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 19 Feb 2024 20:01:24 +0100 Subject: [PATCH] build: disable conversion warnings for GCC GCC seems chronically incapable of producing correct and relevant conversion warnings, and will therefore need to be silenced. --- src/nvim/CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index f393993894..54ad43e8f3 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -121,11 +121,9 @@ elseif(MINGW) # Enable wmain target_link_libraries(nvim_bin PRIVATE -municode) elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU") - if(CMAKE_C_COMPILER_VERSION VERSION_LESS 10) - target_compile_options(main_lib INTERFACE -Wno-conversion) - endif() - - target_compile_options(main_lib INTERFACE -fno-common + target_compile_options(main_lib INTERFACE + -Wno-conversion + -fno-common $<$:-Wno-unused-result> $<$:-Wno-unused-result> $<$:-Wno-unused-result>)