From ee9450daa2ebdcf17f0d750b3a2ea4c19c562387 Mon Sep 17 00:00:00 2001 From: Igor Kulaychuk Date: Thu, 7 Dec 2017 22:40:35 +0300 Subject: [PATCH] Fix return type of vsnprintf --- src/debug/netcoredbg/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/debug/netcoredbg/main.cpp b/src/debug/netcoredbg/main.cpp index 0ab93d3..a911e76 100644 --- a/src/debug/netcoredbg/main.cpp +++ b/src/debug/netcoredbg/main.cpp @@ -120,12 +120,12 @@ void Debugger::Message(const char *fmt, ...) va_start(args, fmt); char buf[32]; - size_t n = std::vsnprintf(buf, sizeof(buf), fmt, args); + int n = std::vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); std::string text; - if (n >= sizeof(buf)) + if (n >= (int)sizeof(buf)) { // Static buffer too small text.resize(n + 1, 0); -- 2.7.4