summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/System')
-rw-r--r--llvm/lib/System/Win32/Host.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/System/Win32/Host.inc b/llvm/lib/System/Win32/Host.inc
index f105b38f83a..7bbf2bd346e 100644
--- a/llvm/lib/System/Win32/Host.inc
+++ b/llvm/lib/System/Win32/Host.inc
@@ -22,14 +22,16 @@ std::string sys::osName() {
}
std::string sys::osVersion() {
- OSVERSIONINFO osvi = { 0 };
+ OSVERSIONINFO osvi;
+
+ memset(&osvi, 0, sizeof(osvi));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
if (!GetVersionEx(&osvi))
return "";
-
+
char buf[64];
- sprintf(buf, "%d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
+ sprintf(buf, "%d.%d", (int)osvi.dwMajorVersion, (int)osvi.dwMinorVersion);
- return buf;
+ return buf;
}
OpenPOWER on IntegriCloud