From 09fa1665d98a53439604067f9048d10e7d3b54b8 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 12 Sep 2023 22:55:46 +0800 Subject: [PATCH] fix check warnings --- xmake/check_interfaces.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmake/check_interfaces.lua b/xmake/check_interfaces.lua index ae6114eb6..4f5f75d7c 100644 --- a/xmake/check_interfaces.lua +++ b/xmake/check_interfaces.lua @@ -43,7 +43,7 @@ end function _check_module_csnippet(target, module, includes, name, snippet) local checkname = module .. "_" .. name local ok = false - if target:check_csnippets({[checkname] = snippet}, {includes = includes}) then + if target:check_csnippets({[checkname] = snippet}, {includes = includes, configs = {cflags = "-Wno-error=unused-variable"}}) then target:set("configvar", ("TB_CONFIG_%s_HAVE_%s"):format(module:upper(), name:upper()), 1) ok = true end @@ -60,7 +60,7 @@ end function _check_keyword_csnippet(target, name, varname, snippet, configs) local checkname = name local ok = false - if target:check_csnippets({[checkname] = snippet}, {configs = configs}) then + if target:check_csnippets({[checkname] = snippet}, {configs = table.join({cflags = "-Wno-error=unused-variable"}, configs)}) then target:set("configvar", varname, 1) ok = true end