Fix compile errors with VS2019 v16.9.3 and GCC v7.5.0 (see issue #3140)

This commit is contained in:
Marshall Greenblatt
2021-06-20 12:08:10 -04:00
parent 529b91bc6e
commit 9efd3dc8ee
14 changed files with 39 additions and 3 deletions

View File

@@ -210,7 +210,7 @@ std::string SystemErrorCodeToString(SystemErrorCode error_code) {
char msgbuf[error_message_buffer_size];
DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS;
DWORD len = FormatMessageA(flags, NULL, error_code, 0, msgbuf,
base::size(msgbuf), NULL);
static_cast<DWORD>(base::size(msgbuf)), NULL);
std::stringstream ss;
if (len) {
std::string s(msgbuf);