[cfe-commits] r82194 - /cfe/trunk/lib/Basic/FileManager.cpp
Chris Lattner
sabre at nondot.org
Thu Sep 17 21:51:01 PDT 2009
Author: lattner
Date: Thu Sep 17 23:51:01 2009
New Revision: 82194
URL: http://llvm.org/viewvc/llvm-project?rev=82194&view=rev
Log:
don't stick an uninitialized 'stat' buf into the stat cache, fill it
with zeros. This avoids a GCC warning (PR5000)
Modified:
cfe/trunk/lib/Basic/FileManager.cpp
Modified: cfe/trunk/lib/Basic/FileManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/FileManager.cpp?rev=82194&r1=82193&r2=82194&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/FileManager.cpp (original)
+++ cfe/trunk/lib/Basic/FileManager.cpp Thu Sep 17 23:51:01 2009
@@ -295,6 +295,7 @@
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()) {
More information about the cfe-commits
mailing list