mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
fix(Core/Misc): GCC warnings (#3428)
This commit is contained in:
@@ -235,7 +235,13 @@ std::string TimeToTimestampStr(time_t t)
|
||||
// MM minutes (2 digits 00-59)
|
||||
// SS seconds (2 digits 00-59)
|
||||
char buf[20];
|
||||
snprintf(buf, 20, "%04d-%02d-%02d_%02d-%02d-%02d", aTm.tm_year+1900, aTm.tm_mon+1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec);
|
||||
int ret = snprintf(buf, 20, "%04d-%02d-%02d_%02d-%02d-%02d", aTm.tm_year+1900, aTm.tm_mon+1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
return std::string("ERROR");
|
||||
}
|
||||
|
||||
return std::string(buf);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user