r178351 - Remove sign-compare warning on systems that still use 32 bit time_ts.
Benjamin Kramer
benny.kra at googlemail.com
Fri Mar 29 10:39:43 PDT 2013
Author: d0k
Date: Fri Mar 29 12:39:43 2013
New Revision: 178351
URL: http://llvm.org/viewvc/llvm-project?rev=178351&view=rev
Log:
Remove sign-compare warning on systems that still use 32 bit time_ts.
Modified:
cfe/trunk/lib/Frontend/CompilerInstance.cpp
Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=178351&r1=178350&r2=178351&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Fri Mar 29 12:39:43 2013
@@ -1029,9 +1029,8 @@ static void pruneModuleCache(const Heade
// If not, do nothing.
time_t TimeStampModTime = StatBuf.st_mtime;
time_t CurrentTime = time(0);
- if (CurrentTime - TimeStampModTime <= HSOpts.ModuleCachePruneInterval) {
+ if (CurrentTime - TimeStampModTime <= time_t(HSOpts.ModuleCachePruneInterval))
return;
- }
// Write a new timestamp file so that nobody else attempts to prune.
// There is a benign race condition here, if two Clang instances happen to
@@ -1071,8 +1070,9 @@ static void pruneModuleCache(const Heade
// If the file has been used recently enough, leave it there.
time_t FileAccessTime = StatBuf.st_atime;
- if (CurrentTime - FileAccessTime <= HSOpts.ModuleCachePruneAfter) {
- RemovedAllFiles = false;;
+ if (CurrentTime - FileAccessTime <=
+ time_t(HSOpts.ModuleCachePruneAfter)) {
+ RemovedAllFiles = false;
continue;
}
More information about the cfe-commits
mailing list