From fe2579a639ec06494c4c7db13efb75caf9bfe92c Mon Sep 17 00:00:00 2001 From: Vaclav Haisman Date: Sun, 8 Dec 2024 10:17:19 +0100 Subject: [PATCH] Use more std::unreachable(). --- src/env.cxx | 1 + src/hierarchy.cxx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/env.cxx b/src/env.cxx index 571c9b6e2..0045954e2 100644 --- a/src/env.cxx +++ b/src/env.cxx @@ -129,6 +129,7 @@ get_env_var (tstring & value, tstring const & name) helpers::getLogLog().error( LOG4CPLUS_TEXT ("_dupenv_s failed. Error: ") + helpers::convertIntegerToString (eno), true); + std::unreachable (); } return !! buf; diff --git a/src/hierarchy.cxx b/src/hierarchy.cxx index 73b2306e0..6f9fde4af 100644 --- a/src/hierarchy.cxx +++ b/src/hierarchy.cxx @@ -294,6 +294,7 @@ Hierarchy::getInstanceImpl(const tstring_view& name, helpers::getLogLog().error( LOG4CPLUS_TEXT("Hierarchy::getInstanceImpl()- Insert failed"), true); + std::unreachable (); } if (auto pnm_it = provisionNodes.find(name); pnm_it != provisionNodes.end()) @@ -352,6 +353,7 @@ Hierarchy::updateParents(Logger const & logger) helpers::getLogLog().error( LOG4CPLUS_TEXT("Hierarchy::updateParents()- Insert failed"), true); + std::unreachable (); } } } // end if Logger found