[llvm-commits] [llvm] r58563 - /llvm/trunk/lib/System/Win32/Host.inc
Anton Korobeynikov
asl at math.spbu.ru
Sun Nov 2 03:47:13 PST 2008
Author: asl
Date: Sun Nov 2 05:47:11 2008
New Revision: 58563
URL: http://llvm.org/viewvc/llvm-project?rev=58563&view=rev
Log:
Silence a warning
Modified:
llvm/trunk/lib/System/Win32/Host.inc
Modified: llvm/trunk/lib/System/Win32/Host.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Win32/Host.inc?rev=58563&r1=58562&r2=58563&view=diff
==============================================================================
--- llvm/trunk/lib/System/Win32/Host.inc (original)
+++ llvm/trunk/lib/System/Win32/Host.inc Sun Nov 2 05:47:11 2008
@@ -22,14 +22,16 @@
}
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;
}
More information about the llvm-commits
mailing list