Clang 10 warning fix: -Wstring-plus-int at src/lua/lundump.cpp:237.
This commit is contained in:
parent
72635ea845
commit
f02a99785c
2 changed files with 8 additions and 1 deletions
|
@ -196,6 +196,12 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||
APPEND_STRING PROPERTY COMPILE_FLAGS
|
||||
" -Wno-parentheses-equality"
|
||||
)
|
||||
# silence a Clang specific warning when compiling the lua code
|
||||
set_property(SOURCE
|
||||
SOURCE ${lua_STAT_SRC}
|
||||
APPEND_STRING PROPERTY COMPILE_FLAGS
|
||||
" -Wno-string-plus-int"
|
||||
)
|
||||
endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
|
||||
# a 'lib' is automatically set in front when creating the library (as in the filename)
|
||||
|
|
|
@ -109,8 +109,9 @@ env_lua = env.Clone(
|
|||
|
||||
env_lua.AppendUnique(CCFLAGS = Split("-Wno-old-style-cast -Wno-useless-cast"))
|
||||
# Silence some Clang-specific warnings due to extra parentheses in if statements when comparing.
|
||||
# also silence a warning for the lua code
|
||||
if "clang" in env["CXX"]:
|
||||
env_lua.AppendUnique(CCFLAGS = Split("-Wno-parentheses-equality"))
|
||||
env_lua.AppendUnique(CCFLAGS = Split("-Wno-parentheses-equality -Wno-string-plus-int"))
|
||||
|
||||
if env_lua["enable_lto"] == True:
|
||||
env_lua["AR"] = 'gcc-ar'
|
||||
|
|
Loading…
Add table
Reference in a new issue