From ebb126135292298d31931999dc62871f0b3e6535 Mon Sep 17 00:00:00 2001 From: Anar Manafov Date: Thu, 22 Jun 2023 13:24:57 +0200 Subject: [PATCH] Fix build warnings --- CMakeLists.txt | 10 +++++----- dds-session/src/main.cpp | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e3be2b8..49c1f850 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2014-2023 GSI, Inc. All rights reserved. # # +# +# Check if cmake has the required version +# +cmake_minimum_required( VERSION 3.23.1 FATAL_ERROR ) + project( DDS ) set(BUILD_SHARED_LIBS ON) set(DDS_USER_DEFAULTS_CFG_VERSION "0.5") set(DDS_PROTOCOL_VERSION "2") -# -# Check if cmake has the required version -# -cmake_minimum_required( VERSION 3.23.1 FATAL_ERROR ) - string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") diff --git a/dds-session/src/main.cpp b/dds-session/src/main.cpp index 82154e4e..fb71902f 100644 --- a/dds-session/src/main.cpp +++ b/dds-session/src/main.cpp @@ -78,7 +78,7 @@ void rebuildSessions(vector& _session_dirs, StringVector_t& _sessions) _session_dirs.push_back(dir.path()); // Workaround: using .leaf().string(), instead of just .leaf(), vecasue we want to avoid double quotes // in output. - _sessions.push_back(dir.path().leaf().string()); + _sessions.push_back(dir.path().filename().string()); } } @@ -99,7 +99,7 @@ void listSessions(const vector& _session_dirs, SSessionsSorting::EType for (auto& dir : sortedDirs) { - string sSID = dir.second.leaf().string(); + string sSID = dir.second.filename().string(); if (!IsValid(sSID)) continue; @@ -137,7 +137,7 @@ void performDataRetention(const vector& _session_dirs) noexcept << " will be deleted..."; for (const auto& i : _session_dirs) { - const string sid{ i.leaf().string() }; + const string sid{ i.filename().string() }; if (!IsValid(sid)) continue; @@ -304,7 +304,7 @@ int main(int argc, char* argv[]) { for (auto& dir : session_dirs) { - const string sSID(dir.leaf().string()); + const string sSID(dir.filename().string()); // Ignore non-sid or bad items if (!IsValid(sSID))