diff options
author | Antons Jeļkins <Antons.Jelkins@bmw.de> | 2021-11-16 17:34:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-11-18 14:17:38 (GMT) |
commit | f0eae9292baa9932e6c5eb8d95b7552c291cfeb4 (patch) | |
tree | 07c47fedf4d4b941b12349597f4171be6c016369 /Source/cmTimestamp.cxx | |
parent | a5eed9e5e0aa2a4feac1c6dc4c717e167420a657 (diff) | |
download | CMake-f0eae9292baa9932e6c5eb8d95b7552c291cfeb4.zip CMake-f0eae9292baa9932e6c5eb8d95b7552c291cfeb4.tar.gz CMake-f0eae9292baa9932e6c5eb8d95b7552c291cfeb4.tar.bz2 |
cmTimestamp: Declare component buffer before MinGW-specific code
Diffstat (limited to 'Source/cmTimestamp.cxx')
-rw-r--r-- | Source/cmTimestamp.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx index cfea4cf..9125d7e 100644 --- a/Source/cmTimestamp.cxx +++ b/Source/cmTimestamp.cxx @@ -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); |