From 45f2b483eeed66cd24ceb64ea8a38b0eb3833da6 Mon Sep 17 00:00:00 2001 From: Anil Tuncel Date: Fri, 20 Oct 2023 18:57:34 +0200 Subject: [PATCH 1/2] clang warning: remove unused variable --- efel/cppcore/LibV1.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/efel/cppcore/LibV1.cpp b/efel/cppcore/LibV1.cpp index 80550678..25c1eee1 100644 --- a/efel/cppcore/LibV1.cpp +++ b/efel/cppcore/LibV1.cpp @@ -434,7 +434,6 @@ static int __burst_ISI_indices(double BurstFactor, vector& PeakIndex, vector& ISIValues, vector& BurstIndex) { vector ISIpcopy; - vector::iterator it1, it2; int n, count = -1; double dMedian; From ab3c00582d7b4cbf287bc7a20198d7baa4098874 Mon Sep 17 00:00:00 2001 From: Anil Tuncel Date: Fri, 20 Oct 2023 18:58:04 +0200 Subject: [PATCH 2/2] change string construction for clang --- efel/cppcore/Utils.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/efel/cppcore/Utils.h b/efel/cppcore/Utils.h index c064cb6a..ad7784ed 100644 --- a/efel/cppcore/Utils.h +++ b/efel/cppcore/Utils.h @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include #include "EfelExceptions.h" @@ -86,8 +88,9 @@ inline void efel_assert(bool assertion, const char *message, const char *file, const int line) { if(!assertion){ - using std::string, std::to_string; - string errorMsg = "Assertion fired(" + string(file) + ":" + to_string(line) + "): " + string(message); + std::ostringstream os; + os << "Assertion fired(" << file << ":" << line << "): " << message; + std::string errorMsg = os.str(); throw EfelAssertionError(errorMsg); } }