Skip to content

Commit dd84aae

Browse files
Fix mono build warnings
1 parent a4adeb2 commit dd84aae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/mono/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,11 @@ if(GCC)
453453
endif()
454454
set(WERROR "-Werror=return-type -Werror-implicit-function-declaration")
455455

456+
check_c_compiler_flag("-Wno-unused-but-set-variable" WNO_UNUSED_BUT_SET_VARIABLE)
457+
if(WNO_UNUSED_BUT_SET_VARIABLE)
458+
set(WARNINGS "${WARNINGS} -Wno-unused-but-set-variable")
459+
endif()
460+
456461
append("${WARNINGS} ${WERROR}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
457462

458463
set(MONO_ZERO_LEN_ARRAY 0)

0 commit comments

Comments
 (0)