From 93d41b2c0ecd0db7075e2386596ce39cb20546c9 Mon Sep 17 00:00:00 2001 From: gabime Date: Thu, 22 Mar 2018 20:35:49 +0200 Subject: [PATCH] fixed gcc warning about struct stat --- include/spdlog/details/os.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index e6b5cd2a..5a5dbde8 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -238,9 +238,7 @@ 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);