summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-18 04:51:01 +0000
committerChris Lattner <sabre@nondot.org>2009-09-18 04:51:01 +0000
commit01ce06fbbcf072ce46dd4be55d5902f9df43f550 (patch)
tree2ec833f1c24979aff0015552cbbd360019b61d25 /clang
parent2b5e1dda693f30dd9ca1645665a55cee79c32c81 (diff)
downloadbcm5719-llvm-01ce06fbbcf072ce46dd4be55d5902f9df43f550.tar.gz
bcm5719-llvm-01ce06fbbcf072ce46dd4be55d5902f9df43f550.zip
don't stick an uninitialized 'stat' buf into the stat cache, fill it
with zeros. This avoids a GCC warning (PR5000) llvm-svn: 82194
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Basic/FileManager.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp
index e0a7e657563..df86f9d0470 100644
--- a/clang/lib/Basic/FileManager.cpp
+++ b/clang/lib/Basic/FileManager.cpp
@@ -295,6 +295,7 @@ int MemorizeStatCalls::stat(const char *path, struct stat *buf) {
if (result != 0) {
// Cache failed 'stat' results.
struct stat empty;
+ memset(&empty, 0, sizeof(empty));
StatCalls[path] = StatResult(result, empty);
}
else if (!S_ISDIR(buf->st_mode) || llvm::sys::Path(path).isAbsolute()) {
OpenPOWER on IntegriCloud