From 08350ccd64085af56d484c915a9106c8d831a1ce Mon Sep 17 00:00:00 2001 From: Bruce Date: Thu, 13 Jun 2024 22:01:30 +0800 Subject: [PATCH] fix build warnnings --- lualib-src/lua_uuid.cpp | 2 +- moon-src/core/network/moon_connection.hpp | 2 +- moon-src/core/network/stream_connection.hpp | 2 -- moon-src/core/network/ws_connection.hpp | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lualib-src/lua_uuid.cpp b/lualib-src/lua_uuid.cpp index 7524a4b98..55eb7cd2e 100644 --- a/lualib-src/lua_uuid.cpp +++ b/lualib-src/lua_uuid.cpp @@ -9,7 +9,7 @@ #define METANAME "luuid" //////////////////////////////////uuid/////////////////////////////////// -static constexpr int64_t FLAG_BITS = 1; +// static constexpr int64_t FLAG_BITS = 1; static constexpr int64_t TYPE_BITS = 9; static constexpr int64_t SERVERID_BITS = 12; static constexpr int64_t BOOTTIMES_BITS = 10; diff --git a/moon-src/core/network/moon_connection.hpp b/moon-src/core/network/moon_connection.hpp index ec59063c0..ae58691cb 100644 --- a/moon-src/core/network/moon_connection.hpp +++ b/moon-src/core/network/moon_connection.hpp @@ -146,7 +146,7 @@ namespace moon cache_.clear(); asio::async_read(socket_, moon::streambuf(data_.get()), asio::transfer_exactly(static_cast(-diff)), - [this, self = shared_from_this(), size, fin](const asio::error_code& e, std::size_t) + [this, self = shared_from_this(), fin](const asio::error_code& e, std::size_t) { if (!e) { diff --git a/moon-src/core/network/stream_connection.hpp b/moon-src/core/network/stream_connection.hpp index 38f491be1..9c330d56b 100644 --- a/moon-src/core/network/stream_connection.hpp +++ b/moon-src/core/network/stream_connection.hpp @@ -11,8 +11,6 @@ namespace moon size_t max_size = 0; static_string delim; - read_until() = default; - read_until(size_t max_size, std::string_view delims) : max_size(max_size>0?max_size: std::numeric_limits::max()) , delim(delims) diff --git a/moon-src/core/network/ws_connection.hpp b/moon-src/core/network/ws_connection.hpp index 3a78cbe20..24fa444de 100644 --- a/moon-src/core/network/ws_connection.hpp +++ b/moon-src/core/network/ws_connection.hpp @@ -420,7 +420,7 @@ namespace moon cache_.clear(); asio::async_read(socket_, moon::streambuf(data_.get()), asio::transfer_exactly(static_cast(-diff)), - [this, self = shared_from_this(), size, fh](const asio::error_code& e, std::size_t) + [this, self = shared_from_this(), fh](const asio::error_code& e, std::size_t) { if (!e) {