summaryrefslogtreecommitdiffstats
path: root/win/tclWinInit.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2009-11-18 21:59:49 (GMT)
committernijtmans <nijtmans>2009-11-18 21:59:49 (GMT)
commit22da2964cc80cf1b750e2c467f9b732dc17f682f (patch)
treeddefc8b4f539a5dd99629207908dae49d8e515db /win/tclWinInit.c
parent1cb4f92988da74c1fbee275ed1a3e70f784fc19f (diff)
downloadtcl-22da2964cc80cf1b750e2c467f9b732dc17f682f.zip
tcl-22da2964cc80cf1b750e2c467f9b732dc17f682f.tar.gz
tcl-22da2964cc80cf1b750e2c467f9b732dc17f682f.tar.bz2
Eliminate various gcc warnings (in -Wextra mode)
Diffstat (limited to 'win/tclWinInit.c')
-rw-r--r--win/tclWinInit.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 8043971..7e33234 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinInit.c,v 1.83 2009/08/02 10:41:09 nijtmans Exp $
+ * RCS: @(#) $Id: tclWinInit.c,v 1.84 2009/11/18 21:59:50 nijtmans Exp $
*/
#include "tclWinInt.h"
@@ -472,8 +472,10 @@ TclpSetVariables(
{
const char *ptr;
char buffer[TCL_INTEGER_SPACE * 2];
- SYSTEM_INFO sysInfo, *sysInfoPtr = &sysInfo;
- OemId *oemId;
+ union {
+ SYSTEM_INFO info;
+ OemId oemId;
+ } sys;
OSVERSIONINFOA osInfo;
Tcl_DString ds;
WCHAR szUserName[UNLEN+1];
@@ -485,8 +487,7 @@ TclpSetVariables(
osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
GetVersionExA(&osInfo);
- oemId = (OemId *) sysInfoPtr;
- GetSystemInfo(&sysInfo);
+ GetSystemInfo(&sys.info);
/*
* Define the tcl_platform array.
@@ -500,9 +501,9 @@ TclpSetVariables(
}
wsprintfA(buffer, "%d.%d", osInfo.dwMajorVersion, osInfo.dwMinorVersion);
Tcl_SetVar2(interp, "tcl_platform", "osVersion", buffer, TCL_GLOBAL_ONLY);
- if (oemId->wProcessorArchitecture < NUMPROCESSORS) {
+ if (sys.oemId.wProcessorArchitecture < NUMPROCESSORS) {
Tcl_SetVar2(interp, "tcl_platform", "machine",
- processors[oemId->wProcessorArchitecture],
+ processors[sys.oemId.wProcessorArchitecture],
TCL_GLOBAL_ONLY);
}