@@ -173,15 +173,15 @@ TEST_CASE("attribute test - nested scoped") {
173173}
174174
175175TEST_CASE (" attribute test - multi threaded" ) {
176- const int n_tasks = std::thread::hardware_concurrency ();
176+ const unsigned int n_tasks = std::thread::hardware_concurrency ();
177177 constexpr auto n_values = 30 ;
178178 auto mt_sink = std::make_shared<spdlog::sinks::test_sink_mt>();
179179 auto logger = spdlog::logger (" logger" , mt_sink);
180180 logger.set_pattern (" [%n] [%*]" );
181181
182182 // put attributes with multiple threads simultaneously
183183 std::vector<std::future<void >> tasks;
184- for (auto i = 0 ; i < n_tasks; ++i) {
184+ for (unsigned int i = 0 ; i < n_tasks; ++i) {
185185 auto task = std::async ([&logger, i, n_values] {
186186 for (auto j = 0 ; j < n_values; ++j)
187187 logger.attrs ().put (fmt_lib::format (" log_{}_key_{}" , i, j), fmt_lib::format (" log_{}_value_{}" , i, j));
@@ -194,7 +194,7 @@ TEST_CASE("attribute test - multi threaded") {
194194 logger.info (" " );
195195 REQUIRE (!mt_sink->lines ().empty ());
196196 auto log_line = mt_sink->lines ().back ();
197- for (auto i = 0 ; i < n_tasks; ++i) {
197+ for (unsigned int i = 0 ; i < n_tasks; ++i) {
198198 for (auto j = 0 ; j < n_values; ++j) {
199199 auto search_term = fmt_lib::format (" log_{0}_key_{1}:log_{0}_value_{1}" , i, j);
200200 REQUIRE (log_line.find (search_term) != std::string::npos);
0 commit comments