diff --git a/lib/include/srslte/srslog/bundled/fmt/chrono.h b/lib/include/srslte/srslog/bundled/fmt/chrono.h index e70b8053a..72b5af0ac 100644 --- a/lib/include/srslte/srslog/bundled/fmt/chrono.h +++ b/lib/include/srslte/srslog/bundled/fmt/chrono.h @@ -339,7 +339,7 @@ inline std::tm localtime(std::time_t time) { #if !FMT_MSC_VER bool fallback(detail::null<>) { using namespace fmt::detail; - std::tm* tm = std::localtime(&time_); + std::tm* tm = std::localtime(&time_); // lgtm[cpp/potentially-dangerous-function] if (tm) tm_ = *tm; return tm != nullptr; } @@ -375,7 +375,7 @@ inline std::tm gmtime(std::time_t time) { #if !FMT_MSC_VER bool fallback(detail::null<>) { - std::tm* tm = std::gmtime(&time_); + std::tm* tm = std::gmtime(&time_); // lgtm[cpp/potentially-dangerous-function] if (tm) tm_ = *tm; return tm != nullptr; } diff --git a/lib/include/srslte/srslog/bundled/fmt/core.h b/lib/include/srslte/srslog/bundled/fmt/core.h index 37799a3a0..252dabbe8 100644 --- a/lib/include/srslte/srslog/bundled/fmt/core.h +++ b/lib/include/srslte/srslog/bundled/fmt/core.h @@ -509,6 +509,7 @@ template struct char_t_impl::value>> { struct error_handler { constexpr error_handler() = default; constexpr error_handler(const error_handler&) = default; + error_handler& operator=(const error_handler&) = default; // This function is intentionally not constexpr to give a compile-time error. FMT_NORETURN FMT_API void on_error(const char* message); diff --git a/lib/src/srslog/event_trace.cpp b/lib/src/srslog/event_trace.cpp index f3754bbb2..9a1d372e0 100644 --- a/lib/src/srslog/event_trace.cpp +++ b/lib/src/srslog/event_trace.cpp @@ -64,7 +64,9 @@ void srslog::event_trace_init(log_channel& c) static void format_time(char* buffer, size_t len) { std::time_t t = std::time(nullptr); - std::strftime(buffer, len, "%FT%T", std::localtime(&t)); + std::tm lt{}; + ::localtime_r(&t, <); + std::strftime(buffer, len, "%FT%T", <); } namespace srslog {