mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-26 04:09:35 +03: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__
|
||||
/* 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. */
|
||||
@@ -210,8 +212,6 @@ std::string cmTimestamp::AddTimestampComponent(char flag,
|
||||
static T strftime = loadStrftime();
|
||||
#endif
|
||||
|
||||
char buffer[16];
|
||||
|
||||
size_t size =
|
||||
strftime(buffer, sizeof(buffer), formatString.c_str(), &timeStruct);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user