WinCOFFObjectWriter.cpp: Appease a warning in checking std::time_t. [-Wsign-compare]

llvm-svn: 246839
This commit is contained in:
NAKAMURA Takumi 2015-09-04 05:19:37 +00:00
parent f6cef72f12
commit c95358b1ea
1 changed files with 1 additions and 1 deletions

View File

@ -1016,7 +1016,7 @@ void WinCOFFObjectWriter::writeObject(MCAssembler &Asm,
// MS LINK expects to be able to use this timestamp to implement their
// /INCREMENTAL feature.
std::time_t Now = time(nullptr);
if (Now < 0 || Now > UINT32_MAX)
if (Now < 0 || (unsigned long)Now > UINT32_MAX)
Now = UINT32_MAX;
Header.TimeDateStamp = Now;