Skip to content

Commit

Permalink
Silencing bogus warning when building under Xcode
Browse files Browse the repository at this point in the history
  • Loading branch information
gershnik committed Aug 8, 2023
1 parent 91bf781 commit 211bc68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/http_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ auto HttpConnection::parseBody(const std::byte * first, const std::byte * last)
WSDLOG_TRACE("HTTP from {}, received {}", m_callerDesc, std::string_view((const char *)first, chunkSize));

try {
m_contentParser->parseChunk((const uint8_t *)first, chunkSize, m_contentRemaining == 0);
//int cast is safe because our buffer is much much smaller than max int (8192 currently)
m_contentParser->parseChunk((const uint8_t *)first, int(chunkSize), m_contentRemaining == 0);
} catch(std::exception & ex) {
WSDLOG_INFO("HTTP from {}: error parsing XML {}", m_callerDesc, ex.what());
WSDLOG_TRACE("{}", formatCaughtExceptionBacktrace());
Expand Down

0 comments on commit 211bc68

Please sign in to comment.