mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-12 17:00:25 +08:00
fixed clang warning about uninitialized values
This commit is contained in:
parent
200815892f
commit
18c99682a8
@ -238,13 +238,17 @@ inline size_t filesize(FILE *f)
|
|||||||
int fd = fileno(f);
|
int fd = fileno(f);
|
||||||
// 64 bits(but not in osx or cygwin, where fstat64 is deprecated)
|
// 64 bits(but not in osx or cygwin, where fstat64 is deprecated)
|
||||||
#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__)
|
#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__)
|
||||||
struct stat64 st;
|
struct stat64 st
|
||||||
|
{
|
||||||
|
};
|
||||||
if (fstat64(fd, &st) == 0)
|
if (fstat64(fd, &st) == 0)
|
||||||
{
|
{
|
||||||
return static_cast<size_t>(st.st_size);
|
return static_cast<size_t>(st.st_size);
|
||||||
}
|
}
|
||||||
#else // unix 32 bits or cygwin
|
#else // unix 32 bits or cygwin
|
||||||
struct stat st;
|
struct stat st
|
||||||
|
{
|
||||||
|
};
|
||||||
if (fstat(fd, &st) == 0)
|
if (fstat(fd, &st) == 0)
|
||||||
{
|
{
|
||||||
return static_cast<size_t>(st.st_size);
|
return static_cast<size_t>(st.st_size);
|
||||||
|
@ -249,7 +249,7 @@ private:
|
|||||||
size_t _async_q_size = 0;
|
size_t _async_q_size = 0;
|
||||||
async_overflow_policy _overflow_policy = async_overflow_policy::block_retry;
|
async_overflow_policy _overflow_policy = async_overflow_policy::block_retry;
|
||||||
std::function<void()> _worker_warmup_cb;
|
std::function<void()> _worker_warmup_cb;
|
||||||
std::chrono::milliseconds _flush_interval_ms;
|
std::chrono::milliseconds _flush_interval_ms{std::chrono::milliseconds::zero()};
|
||||||
std::function<void()> _worker_teardown_cb;
|
std::function<void()> _worker_teardown_cb;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user