Fix some compilation warnings (#2066)

This commit is contained in:
An Tao 2024-06-13 17:11:03 +08:00 committed by GitHub
parent de5a4a5f57
commit b04dfd7f96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View File

@ -367,12 +367,12 @@ void AccessLogger::outputDate(trantor::LogStream &stream,
{ {
if (useLocalTime_) if (useLocalTime_)
{ {
stream << trantor::Date::now().toCustomedFormattedStringLocal( stream << trantor::Date::now().toCustomFormattedStringLocal(
timeFormat_, showMicroseconds_); timeFormat_, showMicroseconds_);
} }
else else
{ {
stream << trantor::Date::now().toCustomedFormattedString( stream << trantor::Date::now().toCustomFormattedString(
timeFormat_, showMicroseconds_); timeFormat_, showMicroseconds_);
} }
} }
@ -398,12 +398,12 @@ void AccessLogger::outputReqDate(trantor::LogStream &stream,
{ {
if (useLocalTime_) if (useLocalTime_)
{ {
stream << req->creationDate().toCustomedFormattedStringLocal( stream << req->creationDate().toCustomFormattedStringLocal(
timeFormat_, showMicroseconds_); timeFormat_, showMicroseconds_);
} }
else else
{ {
stream << req->creationDate().toCustomedFormattedString( stream << req->creationDate().toCustomFormattedString(
timeFormat_, showMicroseconds_); timeFormat_, showMicroseconds_);
} }
} }

View File

@ -1039,9 +1039,9 @@ char *getHttpFullDate(const trantor::Date &date)
return lastTimeString; return lastTimeString;
} }
lastSecond = nowSecond; lastSecond = nowSecond;
date.toCustomedFormattedString("%a, %d %b %Y %H:%M:%S GMT", date.toCustomFormattedString("%a, %d %b %Y %H:%M:%S GMT",
lastTimeString, lastTimeString,
sizeof(lastTimeString)); sizeof(lastTimeString));
return lastTimeString; return lastTimeString;
} }