OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5baf8ec
)
Silence a warning
author
Anton Korobeynikov
<asl@math.spbu.ru>
Sun, 2 Nov 2008 11:47:11 +0000
(11:47 +0000)
committer
Anton Korobeynikov
<asl@math.spbu.ru>
Sun, 2 Nov 2008 11:47:11 +0000
(11:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58563
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/System/Win32/Host.inc
patch
|
blob
|
history
diff --git
a/lib/System/Win32/Host.inc
b/lib/System/Win32/Host.inc
index
f105b38
..
7bbf2bd
100644
(file)
--- a/
lib/System/Win32/Host.inc
+++ b/
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;
}