Fix warning on gcc11

This commit is contained in:
Nicolas Werner 2021-05-13 01:31:24 +02:00
parent d52c2515bc
commit 44c5236808
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -2906,7 +2906,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...);