diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index b87f00fd..e6b5cd2a 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -238,13 +238,17 @@ inline size_t filesize(FILE *f) int fd = fileno(f); // 64 bits(but not in osx or cygwin, where fstat64 is deprecated) #if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__) - struct stat64 st; + struct stat64 st + { + }; if (fstat64(fd, &st) == 0) { return static_cast(st.st_size); } #else // unix 32 bits or cygwin - struct stat st; + struct stat st + { + }; if (fstat(fd, &st) == 0) { return static_cast(st.st_size); diff --git a/include/spdlog/details/registry.h b/include/spdlog/details/registry.h index 339b025d..614220d5 100644 --- a/include/spdlog/details/registry.h +++ b/include/spdlog/details/registry.h @@ -249,7 +249,7 @@ private: size_t _async_q_size = 0; async_overflow_policy _overflow_policy = async_overflow_policy::block_retry; std::function _worker_warmup_cb; - std::chrono::milliseconds _flush_interval_ms; + std::chrono::milliseconds _flush_interval_ms{std::chrono::milliseconds::zero()}; std::function _worker_teardown_cb; };