From 9cec285678a25594e361049e68081bb6b58d0191 Mon Sep 17 00:00:00 2001 From: Leonid Stryzhevskyi Date: Wed, 15 May 2024 02:41:15 +0300 Subject: [PATCH] Clear ubuntu warnings WIP --- .gitignore | 1 + CMakeLists.txt | 2 +- src/oatpp/async/worker/IOEventWorker_epoll.cpp | 4 +++- src/oatpp/base/Log.cpp | 8 ++++---- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index dc7fce00..74087623 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ .idea/ cmake-build-debug/ cmake-build-debug-visual-studio/ +cmake-build-debug-wsl/ # local build build*/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 7439e4bd..280f9948 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.25 FATAL_ERROR) +cmake_minimum_required(VERSION 3.20 FATAL_ERROR) file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/src/oatpp/Environment.hpp" OATPP_VERSION_MACRO REGEX "#define OATPP_VERSION \"[0-9]+.[0-9]+.[0-9]+\"$") string(REGEX REPLACE "#define OATPP_VERSION \"([0-9]+.[0-9]+.[0-9]+)\"$" "\\1" oatpp_VERSION "${OATPP_VERSION_MACRO}") diff --git a/src/oatpp/async/worker/IOEventWorker_epoll.cpp b/src/oatpp/async/worker/IOEventWorker_epoll.cpp index f6583199..d70bd07b 100644 --- a/src/oatpp/async/worker/IOEventWorker_epoll.cpp +++ b/src/oatpp/async/worker/IOEventWorker_epoll.cpp @@ -166,7 +166,9 @@ void IOEventWorker::waitEvents() { "foreman={}\n" "this={}\n" "specialization={}", - errno, m_inEventsCount, reinterpret_cast(m_foreman), reinterpret_cast(this), m_specialization) + errno, m_inEventsCount, + reinterpret_cast(m_foreman), reinterpret_cast(this), + m_specialization) throw std::runtime_error("[oatpp::async::worker::IOEventWorker::waitEvents()]: Error. Event loop failed."); } diff --git a/src/oatpp/base/Log.cpp b/src/oatpp/base/Log.cpp index 2a1f6326..3a655d83 100644 --- a/src/oatpp/base/Log.cpp +++ b/src/oatpp/base/Log.cpp @@ -95,14 +95,14 @@ LogMessage& LogMessage::operator << (bool value) { LogMessage& LogMessage::operator << (int value) { if(writeNextChunk()) { - m_stream.writeAsString(static_cast(value)); + m_stream.writeAsString(value); } return *this; } LogMessage& LogMessage::operator << (unsigned value) { if(writeNextChunk()) { - m_stream.writeAsString(static_cast(value)); + m_stream.writeAsString(value); } return *this; } @@ -137,14 +137,14 @@ LogMessage& LogMessage::operator << (unsigned long long value) { LogMessage& LogMessage::operator << (float value) { if(writeNextChunk()) { - m_stream.writeAsString(static_cast(value)); + m_stream.writeAsString(value); } return *this; } LogMessage& LogMessage::operator << (double value) { if(writeNextChunk()) { - m_stream.writeAsString(static_cast(value)); + m_stream.writeAsString(value); } return *this; }