fixes windows warnings

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-09-03 11:11:28 -07:00
parent e8495cf829
commit 6773af91bc
8 changed files with 37 additions and 105 deletions
@@ -30,17 +30,16 @@ namespace AssetMemoryAnalyzer
if (customFilename)
{
azsnprintf(sharedBuffer, sizeof(sharedBuffer), "@log@/%s", customFilename);
azsnprintf(sharedBuffer, AZ_ARRAY_SIZE(sharedBuffer), "@log@/%s", customFilename);
}
else
{
char timestampBuffer[64];
time_t ltime;
time(&ltime);
struct tm timeInfo;
AZ_TRAIT_CTIME_LOCALTIME(&timeInfo, &ltime);
strftime(timestampBuffer, sizeof(timestampBuffer), "@log@/assetmem-%Y-%m-%d-%H-%M-%S.%%s", &timeInfo);
azsnprintf(sharedBuffer, sizeof(sharedBuffer), timestampBuffer, extension);
strftime(sharedBuffer, AZ_ARRAY_SIZE(sharedBuffer), "@log@/assetmem-%Y-%m-%d-%H-%M-%S.", &timeInfo);
azstrcat(sharedBuffer, AZ_ARRAY_SIZE(sharedBuffer), extension);
}
return sharedBuffer;