Resolve warnings/errors with extra warnings (#171)

This commit is contained in:
Jonathan R. Madsen
2022-09-28 14:28:32 -05:00
کامیت شده توسط GitHub
والد 2ed818449f
کامیت 4e3527f0ed
25فایلهای تغییر یافته به همراه132 افزوده شده و 135 حذف شده
@@ -85,36 +85,39 @@ auto
ensure_finalization(bool _static_init = false)
{
const auto& _info = thread_info::init();
auto _tid = _info->index_data;
OMNITRACE_CI_THROW(_tid->sequent_value != threading::get_id(),
"Error! internal tid != %li :: %li", threading::get_id(),
_tid->sequent_value);
OMNITRACE_CI_THROW(_tid->system_value != threading::get_sys_tid(),
"Error! system tid != %li :: %li", threading::get_sys_tid(),
_tid->system_value);
const auto& _tid = _info->index_data;
if(_tid)
{
OMNITRACE_CI_THROW(_tid->sequent_value != threading::get_id(),
"Error! internal tid != %li :: %li", threading::get_id(),
_tid->sequent_value);
OMNITRACE_CI_THROW(_tid->system_value != threading::get_sys_tid(),
"Error! system tid != %li :: %li", threading::get_sys_tid(),
_tid->system_value);
}
if(!get_env("OMNITRACE_COLORIZED_LOG", true)) tim::log::colorized() = false;
(void) tim::manager::instance();
(void) tim::settings::shared_instance();
if(!_static_init)
if(_static_init)
{
OMNITRACE_DEBUG_F("\n");
OMNITRACE_BASIC_DEBUG_F("\n");
auto _verbose =
get_verbose_env() + ((get_debug_env() || get_debug_init()) ? 16 : 0);
auto _search_paths = JOIN(':', tim::get_env<std::string>("OMNITRACE_PATH", ""),
tim::get_env<std::string>("PWD"), ".",
tim::get_env<std::string>("LD_LIBRARY_PATH", ""),
tim::get_env<std::string>("LIBRARY_PATH", ""),
tim::get_env<std::string>("PATH", ""));
common::setup_environ(_verbose, _search_paths);
}
else
{
OMNITRACE_BASIC_DEBUG_F("\n");
OMNITRACE_DEBUG_F("\n");
}
auto _verbose = get_verbose_env() + ((get_debug_env() || get_debug_init()) ? 16 : 0);
auto _search_paths = JOIN(':', tim::get_env<std::string>("OMNITRACE_PATH", ""),
tim::get_env<std::string>("PWD"), ".",
tim::get_env<std::string>("LD_LIBRARY_PATH", ""),
tim::get_env<std::string>("LIBRARY_PATH", ""),
tim::get_env<std::string>("PATH", ""));
common::setup_environ(_verbose, _search_paths);
return scope::destructor{ []() { omnitrace_finalize_hidden(); } };
}