diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index 2a0d46e6..c412a30d 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -672,6 +672,8 @@ public: char threadNameBuffer[16] = { 0 }; #ifndef SPDLOG_NO_PTHREAD_ID pthread_getname_np(msg.pthread_id, threadNameBuffer, 16); +#else + (void)msg; #endif threadName_ = threadNameBuffer; ScopedPadder p(threadName_.size(), padinfo_, dest);