mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 14:20:06 -06:00
cmTimestamp: Declare component buffer before MinGW-specific code
This commit is contained in:
committed by
Brad King
parent
a5eed9e5e0
commit
f0eae9292b
@@ -192,6 +192,8 @@ std::string cmTimestamp::AddTimestampComponent(char flag,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char buffer[16];
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
/* See a bug in MinGW: https://sourceforge.net/p/mingw-w64/bugs/793/. A work
|
/* See a bug in MinGW: https://sourceforge.net/p/mingw-w64/bugs/793/. A work
|
||||||
* around is to try to use strftime() from ucrtbase.dll. */
|
* around is to try to use strftime() from ucrtbase.dll. */
|
||||||
@@ -210,8 +212,6 @@ std::string cmTimestamp::AddTimestampComponent(char flag,
|
|||||||
static T strftime = loadStrftime();
|
static T strftime = loadStrftime();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char buffer[16];
|
|
||||||
|
|
||||||
size_t size =
|
size_t size =
|
||||||
strftime(buffer, sizeof(buffer), formatString.c_str(), &timeStruct);
|
strftime(buffer, sizeof(buffer), formatString.c_str(), &timeStruct);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user