mirror of
https://github.com/neovim/neovim.git
synced 2026-03-28 03:12:00 +00:00
build: suppress -Wfree-nonheap-object false positives in lua_cjson #37250
Problem: Building with GCC emits -Wfree-nonheap-object warnings in lua_cjson code when calling strbuf_free(), despite the free being conditionally valid. This is an unresolved GCC issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98753 Solution: Supress warnings with the -Wno-free-nonheap-object flag for now.
This commit is contained in:
@@ -134,6 +134,8 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
$<$<CONFIG:Release>:-Wno-unused-result>
|
||||
$<$<CONFIG:RelWithDebInfo>:-Wno-unused-result>
|
||||
$<$<CONFIG:MinSizeRel>:-Wno-unused-result>)
|
||||
|
||||
target_link_options(nvim_bin PRIVATE -Wno-free-nonheap-object) # see #37250
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
# On FreeBSD 64 math.h uses unguarded C11 extension, which taints clang
|
||||
# 3.4.1 used there.
|
||||
|
||||
Reference in New Issue
Block a user