summaryrefslogtreecommitdiffstats
path: root/win/tkWinWindow.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-11-29 11:25:09 (GMT)
committernijtmans <nijtmans>2010-11-29 11:25:09 (GMT)
commite55404bc8b824f5841b7e5f42bff2867e7f490ab (patch)
tree387b8aa44b2a3ca8dd4aee1e94187fe633ea2c02 /win/tkWinWindow.c
parent46fb4deb02b07e1c713cb89cb01a817e5b35ee89 (diff)
downloadtk-e55404bc8b824f5841b7e5f42bff2867e7f490ab.zip
tk-e55404bc8b824f5841b7e5f42bff2867e7f490ab.tar.gz
tk-e55404bc8b824f5841b7e5f42bff2867e7f490ab.tar.bz2
Fix various 64-bit gcc(-4.5.2) warnings: cast from pointer to integer of different size
Diffstat (limited to 'win/tkWinWindow.c')
-rw-r--r--win/tkWinWindow.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/win/tkWinWindow.c b/win/tkWinWindow.c
index ea80937..e1ce602 100644
--- a/win/tkWinWindow.c
+++ b/win/tkWinWindow.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinWindow.c,v 1.21 2010/04/29 15:28:04 nijtmans Exp $
+ * RCS: @(#) $Id: tkWinWindow.c,v 1.22 2010/11/29 11:25:09 nijtmans Exp $
*/
#include "tkWinInt.h"
@@ -213,7 +213,10 @@ TkpScanWindowId(
Window *idPtr) /* Place to store converted result. */
{
Tk_Window tkwin;
- Window number, *numberPtr = &number;
+ union {
+ HWND hwnd;
+ int number;
+ } win;
/*
* We want sscanf for the 64-bit check, but if that doesn't work, then
@@ -222,13 +225,13 @@ TkpScanWindowId(
if (
#ifdef _WIN64
- (sscanf(string, "0x%p", &number) != 1) &&
+ (sscanf(string, "0x%p", &win.hwnd) != 1) &&
#endif
- Tcl_GetInt(interp, string, (int *) numberPtr) != TCL_OK) {
+ Tcl_GetInt(interp, string, &win.number) != TCL_OK) {
return TCL_ERROR;
}
- tkwin = Tk_HWNDToWindow((HWND) number);
+ tkwin = Tk_HWNDToWindow(win.hwnd);
if (tkwin) {
*idPtr = Tk_WindowId(tkwin);
} else {