From 0ca531acf4ec258049382e0b6feaecbf8cf78689 Mon Sep 17 00:00:00 2001 From: xiyoo0812 Date: Wed, 8 May 2024 13:26:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/luabus/luabus.mak | 2 ++ core/quanta/quanta.mak | 2 ++ extend/laoi/laoi.mak | 2 ++ extend/lbson/lbson.mak | 2 ++ extend/lbson/src/bson.h | 2 +- extend/lcodec/lcodec.mak | 2 ++ extend/ldetour/ldetour.mak | 2 ++ extend/ljson/ljson.mak | 2 ++ extend/lmake/share.lua | 2 ++ extend/lmdb/lmdb.mak | 2 ++ extend/lminiz/lminiz.mak | 2 ++ extend/lsqlite/lsqlite.mak | 2 ++ extend/lssl/lssl.mak | 2 ++ extend/lstdfs/lstdfs.mak | 2 ++ extend/ltimer/ltimer.mak | 2 ++ extend/lua/lua.mak | 2 ++ extend/lua/luac.mak | 2 ++ extend/lua/lualib.mak | 2 ++ extend/luakit/include/lua_codec.h | 4 ++-- extend/luakit/include/lua_reference.h | 2 +- extend/lualog/lualog.mak | 2 ++ extend/luapb/luapb.mak | 2 ++ extend/luaxlsx/luaxlsx.mak | 2 ++ extend/luaxml/luaxml.mak | 2 ++ extend/luaxml/src/luaxml.cpp | 2 +- extend/lunqlite/lunqlite.mak | 2 ++ extend/lworker/lworker.mak | 2 ++ extend/mimalloc/mimalloc.mak | 2 ++ 28 files changed, 53 insertions(+), 5 deletions(-) diff --git a/core/luabus/luabus.mak b/core/luabus/luabus.mak index f4f29d78..338a61c6 100644 --- a/core/luabus/luabus.mak +++ b/core/luabus/luabus.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17 diff --git a/core/quanta/quanta.mak b/core/quanta/quanta.mak index 42cab883..b6e780e6 100644 --- a/core/quanta/quanta.mak +++ b/core/quanta/quanta.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17 diff --git a/extend/laoi/laoi.mak b/extend/laoi/laoi.mak index ec95c641..6cbabb68 100644 --- a/extend/laoi/laoi.mak +++ b/extend/laoi/laoi.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17 diff --git a/extend/lbson/lbson.mak b/extend/lbson/lbson.mak index a4740c7e..8ba1accc 100644 --- a/extend/lbson/lbson.mak +++ b/extend/lbson/lbson.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17 diff --git a/extend/lbson/src/bson.h b/extend/lbson/src/bson.h index d48c462f..8081d36e 100644 --- a/extend/lbson/src/bson.h +++ b/extend/lbson/src/bson.h @@ -235,7 +235,7 @@ namespace lbson { if (depth > max_bson_depth) { luaL_error(L, "Too depth while encoding bson"); } - size_t raw_len = lua_rawlen(L, -1); + int raw_len = lua_rawlen(L, -1); bson_type type = check_doctype(L, raw_len); write_key(type, key, len); if (type == bson_type::BSON_DOCUMENT) { diff --git a/extend/lcodec/lcodec.mak b/extend/lcodec/lcodec.mak index 8244ef5a..a39ccb28 100644 --- a/extend/lcodec/lcodec.mak +++ b/extend/lcodec/lcodec.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17 diff --git a/extend/ldetour/ldetour.mak b/extend/ldetour/ldetour.mak index 30086494..1d587065 100644 --- a/extend/ldetour/ldetour.mak +++ b/extend/ldetour/ldetour.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17 diff --git a/extend/ljson/ljson.mak b/extend/ljson/ljson.mak index ae8ba8fe..fa402a12 100644 --- a/extend/ljson/ljson.mak +++ b/extend/ljson/ljson.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter MYCFLAGS += -Wno-implicit-fallthrough #c标准库版本 diff --git a/extend/lmake/share.lua b/extend/lmake/share.lua index 0895395a..a8f80bd1 100644 --- a/extend/lmake/share.lua +++ b/extend/lmake/share.lua @@ -12,6 +12,8 @@ ENABLE = true --需要的FLAGS BASE_FLAGS = { + "Wno-unused-variable", + "Wno-unused-parameter", } --FLAGS diff --git a/extend/lmdb/lmdb.mak b/extend/lmdb/lmdb.mak index 24f85bb3..85996d99 100644 --- a/extend/lmdb/lmdb.mak +++ b/extend/lmdb/lmdb.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter MYCFLAGS += -Wno-implicit-fallthrough #c标准库版本 diff --git a/extend/lminiz/lminiz.mak b/extend/lminiz/lminiz.mak index 2b850941..2ea00661 100644 --- a/extend/lminiz/lminiz.mak +++ b/extend/lminiz/lminiz.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter MYCFLAGS += -Wno-implicit-fallthrough #c标准库版本 diff --git a/extend/lsqlite/lsqlite.mak b/extend/lsqlite/lsqlite.mak index 2e7ddd51..8fa203f2 100644 --- a/extend/lsqlite/lsqlite.mak +++ b/extend/lsqlite/lsqlite.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter MYCFLAGS += -Wno-implicit-fallthrough #c标准库版本 diff --git a/extend/lssl/lssl.mak b/extend/lssl/lssl.mak index ca2be185..0a6fed5c 100644 --- a/extend/lssl/lssl.mak +++ b/extend/lssl/lssl.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter MYCFLAGS += -Wno-implicit-fallthrough #c标准库版本 diff --git a/extend/lstdfs/lstdfs.mak b/extend/lstdfs/lstdfs.mak index a6c57f47..ca489e54 100644 --- a/extend/lstdfs/lstdfs.mak +++ b/extend/lstdfs/lstdfs.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17 diff --git a/extend/ltimer/ltimer.mak b/extend/ltimer/ltimer.mak index 76151901..a5884fc6 100644 --- a/extend/ltimer/ltimer.mak +++ b/extend/ltimer/ltimer.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17 diff --git a/extend/lua/lua.mak b/extend/lua/lua.mak index 50fe83c7..463ef88c 100644 --- a/extend/lua/lua.mak +++ b/extend/lua/lua.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17 diff --git a/extend/lua/luac.mak b/extend/lua/luac.mak index 03ef27ec..898db201 100644 --- a/extend/lua/luac.mak +++ b/extend/lua/luac.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17 diff --git a/extend/lua/lualib.mak b/extend/lua/lualib.mak index e7fc244f..dc27e339 100644 --- a/extend/lua/lualib.mak +++ b/extend/lua/lualib.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17 diff --git a/extend/luakit/include/lua_codec.h b/extend/luakit/include/lua_codec.h index 08652be2..c06bf0c5 100644 --- a/extend/luakit/include/lua_codec.h +++ b/extend/luakit/include/lua_codec.h @@ -88,7 +88,7 @@ namespace luakit { index = lua_absindex(L, index); value_encode(buff, type_tab_head); if (is_lua_array(L, index)) { - size_t rawlen = lua_rawlen(L, index); + int rawlen = lua_rawlen(L, index); for (int i = 1; i <= rawlen; ++i) { lua_rawgeti(L, index, i); integer_encode(buff, i); @@ -281,7 +281,7 @@ namespace luakit { index = lua_absindex(L, index); serialize_value(buff, "{"); if (is_lua_array(L, index)) { - size_t rawlen = lua_rawlen(L, index); + int rawlen = lua_rawlen(L, index); for (int i = 1; i <= rawlen; ++i){ if (size++ > 0) { serialize_value(buff, ","); diff --git a/extend/luakit/include/lua_reference.h b/extend/luakit/include/lua_reference.h index 694342c0..35d8b000 100644 --- a/extend/luakit/include/lua_reference.h +++ b/extend/luakit/include/lua_reference.h @@ -31,7 +31,7 @@ namespace luakit { protected: lua_State* m_L = nullptr; - uint32_t m_index = LUA_NOREF; + int32_t m_index = LUA_NOREF; }; template <> diff --git a/extend/lualog/lualog.mak b/extend/lualog/lualog.mak index 65a98135..fd1ed98e 100644 --- a/extend/lualog/lualog.mak +++ b/extend/lualog/lualog.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17 diff --git a/extend/luapb/luapb.mak b/extend/luapb/luapb.mak index c71687a2..87605367 100644 --- a/extend/luapb/luapb.mak +++ b/extend/luapb/luapb.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17 diff --git a/extend/luaxlsx/luaxlsx.mak b/extend/luaxlsx/luaxlsx.mak index 65fa7e4e..e8774f08 100644 --- a/extend/luaxlsx/luaxlsx.mak +++ b/extend/luaxlsx/luaxlsx.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter MYCFLAGS += -Wno-implicit-fallthrough #c标准库版本 diff --git a/extend/luaxml/luaxml.mak b/extend/luaxml/luaxml.mak index 639d0b49..b1300607 100644 --- a/extend/luaxml/luaxml.mak +++ b/extend/luaxml/luaxml.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17 diff --git a/extend/luaxml/src/luaxml.cpp b/extend/luaxml/src/luaxml.cpp index 337adc8c..d1263144 100644 --- a/extend/luaxml/src/luaxml.cpp +++ b/extend/luaxml/src/luaxml.cpp @@ -109,7 +109,7 @@ namespace luaxml { return; } lua_pushstring(L, key); - size_t raw_len = lua_rawlen(L, -2); + int raw_len = lua_rawlen(L, -2); for (int i = 1; i <= raw_len; ++i) { lua_rawgeti(L, -2, i); load_elem4lua(L, printer); diff --git a/extend/lunqlite/lunqlite.mak b/extend/lunqlite/lunqlite.mak index 7e4cb282..9713f61f 100644 --- a/extend/lunqlite/lunqlite.mak +++ b/extend/lunqlite/lunqlite.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter MYCFLAGS += -Wno-implicit-fallthrough MYCFLAGS += -Wmisleading-indentation diff --git a/extend/lworker/lworker.mak b/extend/lworker/lworker.mak index d71f8a50..81cc584d 100644 --- a/extend/lworker/lworker.mak +++ b/extend/lworker/lworker.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17 diff --git a/extend/mimalloc/mimalloc.mak b/extend/mimalloc/mimalloc.mak index f63d52e1..cb0d8d29 100644 --- a/extend/mimalloc/mimalloc.mak +++ b/extend/mimalloc/mimalloc.mak @@ -15,6 +15,8 @@ all : pre_build target post_build MYCFLAGS = #需要定义的FLAG +MYCFLAGS += -Wno-unused-variable +MYCFLAGS += -Wno-unused-parameter #c标准库版本 #gnu99/gnu11/gnu17