mirror of https://github.com/kiwix/libkiwix.git
Fix warning in httplib.
The bug has been fixed upstream at yhirose/cpp-httplib#1091 This commit is a backport of the fix.
This commit is contained in:
parent
eea6f9fe27
commit
0fcf166111
|
@ -2889,7 +2889,7 @@ inline ssize_t Stream::write(const std::string &s) {
|
||||||
|
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
inline ssize_t Stream::write_format(const char *fmt, const Args &... args) {
|
inline ssize_t Stream::write_format(const char *fmt, const Args &... args) {
|
||||||
std::array<char, 2048> buf;
|
std::array<char, 2048> buf{};
|
||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||||
auto sn = _snprintf_s(buf, bufsiz, buf.size() - 1, fmt, args...);
|
auto sn = _snprintf_s(buf, bufsiz, buf.size() - 1, fmt, args...);
|
||||||
|
@ -3756,7 +3756,7 @@ inline socket_t Client::create_client_socket() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool Client::read_response_line(Stream &strm, Response &res) {
|
inline bool Client::read_response_line(Stream &strm, Response &res) {
|
||||||
std::array<char, 2048> buf;
|
std::array<char, 2048> buf{};
|
||||||
|
|
||||||
detail::stream_line_reader line_reader(strm, buf.data(), buf.size());
|
detail::stream_line_reader line_reader(strm, buf.data(), buf.size());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue