Parcourir la source

unittests/Basic/FileManagerTest.cpp: Suppress warnings on gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140364 91177308-0d34-0410-b5e6-96231b3b80d8
NAKAMURA Takumi il y a 14 ans
Parent
commit
d01fb36600
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      unittests/Basic/FileManagerTest.cpp

+ 2 - 1
unittests/Basic/FileManagerTest.cpp

@@ -28,7 +28,8 @@ private:
   llvm::StringMap<struct stat, llvm::BumpPtrAllocator> StatCalls;
 
   void InjectFileOrDirectory(const char *Path, ino_t INode, bool IsFile) {
-    struct stat statBuf = {};
+    struct stat statBuf;
+    memset(&statBuf, 0, sizeof(statBuf));
     statBuf.st_dev = 1;
 #ifndef _WIN32  // struct stat has no st_ino field on Windows.
     statBuf.st_ino = INode;