Skip to content

Commit

Permalink
修复编译警告
Browse files Browse the repository at this point in the history
  • Loading branch information
xiyoo0812 committed May 8, 2024
1 parent b8b5a0d commit 90f0225
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions core/luabus/src/socket_router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ bool socket_router::do_forward_master(router_header* header, char* data, size_t
return true;
}

bool socket_router::do_forward_broadcast(router_header* header, int source, char* data, size_t data_len, size_t& broadcast_num) {
bool socket_router::do_forward_broadcast(router_header* header, uint32_t source, char* data, size_t data_len, size_t& broadcast_num) {
uint16_t service_id = (uint16_t)header->target_id;

uint8_t flag = header->context & 0xf;
Expand All @@ -89,7 +89,6 @@ bool socket_router::do_forward_broadcast(router_header* header, int source, char

auto& services = m_services[service_id];
auto& nodes = services.nodes;
int count = (int)nodes.size();
for (auto& target : nodes) {
if (target.token != 0 && target.token != source) {
m_mgr->sendv(target.token, items, _countof(items));
Expand Down
2 changes: 1 addition & 1 deletion core/luabus/src/socket_router.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class socket_router
bool do_forward_hash(router_header* header, char* data, size_t data_len);
bool do_forward_target(router_header* header, char* data, size_t data_len);
bool do_forward_master(router_header* header, char* data, size_t data_len);
bool do_forward_broadcast(router_header* header, int source, char* data, size_t data_len, size_t& broadcast_num);
bool do_forward_broadcast(router_header* header, uint32_t source, char* data, size_t data_len, size_t& broadcast_num);

private:
size_t m_route_count = 0;
Expand Down
2 changes: 1 addition & 1 deletion extend/lunqlite/lunqlite.lmak
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ TARGET_NAME = "lunqlite"
PROJECT_TYPE = "dynamic"

FLAGS = {
"Wmisleading-indentation"
"Wno-misleading-indentation"
}

--需要的include目录
Expand Down
2 changes: 1 addition & 1 deletion extend/lunqlite/lunqlite.mak
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MYCFLAGS += -Wno-unused-variable
MYCFLAGS += -Wno-unused-parameter
MYCFLAGS += -Wno-unused-but-set-variable
MYCFLAGS += -Wno-unused-but-set-parameter
MYCFLAGS += -Wmisleading-indentation
MYCFLAGS += -Wno-misleading-indentation

#c标准库版本
#gnu99/gnu11/gnu17
Expand Down

0 comments on commit 90f0225

Please sign in to comment.