CMake: Fix dashboard build errors and warnings
memset is not in std:: for VS6, and though quite silly, 0 is not a char
This commit is contained in:
parent
e28ce2483d
commit
12d87c0425
|
@ -34,7 +34,7 @@ std::string cmTimestamp::FileModificationTime(const char* path,
|
||||||
const std::string& formatString, bool utcFlag)
|
const std::string& formatString, bool utcFlag)
|
||||||
{
|
{
|
||||||
struct stat info;
|
struct stat info;
|
||||||
std::memset(&info, 0, sizeof(info));
|
memset(&info, 0, sizeof(info));
|
||||||
|
|
||||||
if(stat(path, &info) != 0)
|
if(stat(path, &info) != 0)
|
||||||
{
|
{
|
||||||
|
@ -58,7 +58,7 @@ std::string cmTimestamp::CreateTimestampFromTimeT(time_t timeT,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct tm timeStruct;
|
struct tm timeStruct;
|
||||||
std::memset(&timeStruct, 0, sizeof(timeStruct));
|
memset(&timeStruct, 0, sizeof(timeStruct));
|
||||||
|
|
||||||
struct tm* ptr = (struct tm*) 0;
|
struct tm* ptr = (struct tm*) 0;
|
||||||
if(utcFlag)
|
if(utcFlag)
|
||||||
|
@ -82,7 +82,7 @@ std::string cmTimestamp::CreateTimestampFromTimeT(time_t timeT,
|
||||||
{
|
{
|
||||||
char c1 = formatString[i];
|
char c1 = formatString[i];
|
||||||
char c2 = (i+1 < formatString.size()) ?
|
char c2 = (i+1 < formatString.size()) ?
|
||||||
formatString[i+1] : 0;
|
formatString[i+1] : static_cast<char>(0);
|
||||||
|
|
||||||
if(c1 == '%' && c2 != 0)
|
if(c1 == '%' && c2 != 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue