diff options
author | nijtmans <nijtmans> | 2010-11-29 09:07:12 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-11-29 09:07:12 (GMT) |
commit | 8ccebbf9fc50bab1c1a3fa148f9632f059296bd2 (patch) | |
tree | f4a05b05f4420db2757c9b6934a169d18c4d0bf0 /win | |
parent | 13fd371fb175d2dc12a9ec83a2cd45f540086857 (diff) | |
download | tk-8ccebbf9fc50bab1c1a3fa148f9632f059296bd2.zip tk-8ccebbf9fc50bab1c1a3fa148f9632f059296bd2.tar.gz tk-8ccebbf9fc50bab1c1a3fa148f9632f059296bd2.tar.bz2 |
Fix various 64-bit gcc(-4.5.2) warnings: cast from pointer to integer of different size
Diffstat (limited to 'win')
-rw-r--r-- | win/stubs.c | 4 | ||||
-rw-r--r-- | win/tkWinButton.c | 6 | ||||
-rw-r--r-- | win/tkWinColor.c | 14 | ||||
-rw-r--r-- | win/tkWinPixmap.c | 4 | ||||
-rw-r--r-- | win/tkWinScrlbr.c | 6 | ||||
-rw-r--r-- | win/ttkWinMonitor.c | 4 |
6 files changed, 19 insertions, 19 deletions
diff --git a/win/stubs.c b/win/stubs.c index cf0983f..7e26d4b 100644 --- a/win/stubs.c +++ b/win/stubs.c @@ -29,7 +29,7 @@ XStringListToTextProperty( int count, XTextProperty *text_prop_return) { - return (Status) NULL; + return (Status) 0; } /* @@ -148,7 +148,7 @@ XGetWMColormapWindows( Window **windows_return, int *count_return) { - return (Status) NULL; + return (Status) 0; } int diff --git a/win/tkWinButton.c b/win/tkWinButton.c index 3c89ebc..4fabf5b 100644 --- a/win/tkWinButton.c +++ b/win/tkWinButton.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: tkWinButton.c,v 1.41 2010/04/29 15:28:04 nijtmans Exp $ + * RCS: @(#) $Id: tkWinButton.c,v 1.42 2010/11/29 09:07:12 nijtmans Exp $ */ #define OEMRESOURCE @@ -260,7 +260,7 @@ CreateProc( SetWindowPos(butPtr->hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); butPtr->oldProc = (WNDPROC)SetWindowLongPtr(butPtr->hwnd, GWLP_WNDPROC, - (INT_PTR) ButtonProc); + (LONG_PTR) ButtonProc); window = Tk_AttachHWND(tkwin, butPtr->hwnd); return window; @@ -290,7 +290,7 @@ TkpDestroyButton( HWND hwnd = winButPtr->hwnd; if (hwnd) { - SetWindowLongPtr(hwnd, GWLP_WNDPROC, (INT_PTR) winButPtr->oldProc); + SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) winButPtr->oldProc); } } diff --git a/win/tkWinColor.c b/win/tkWinColor.c index 47e0cbd..c559d87 100644 --- a/win/tkWinColor.c +++ b/win/tkWinColor.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: tkWinColor.c,v 1.18 2010/11/19 14:48:00 nijtmans Exp $ + * RCS: @(#) $Id: tkWinColor.c,v 1.19 2010/11/29 09:07:13 nijtmans Exp $ */ #include "tkWinInt.h" @@ -368,11 +368,11 @@ XAllocColor( color->pixel = PALETTERGB(entry.peRed, entry.peGreen, entry.peBlue); entryPtr = Tcl_CreateHashEntry(&cmap->refCounts, - (char *) color->pixel, &new); + INT2PTR(color->pixel), &new); if (new) { refCount = 1; } else { - refCount = ((int) Tcl_GetHashValue(entryPtr)) + 1; + refCount = (PTR2INT(Tcl_GetHashValue(entryPtr))) + 1; } Tcl_SetHashValue(entryPtr, INT2PTR(refCount)); } else { @@ -434,11 +434,11 @@ XFreeColors( */ for (i = 0; i < npixels; i++) { - entryPtr = Tcl_FindHashEntry(&cmap->refCounts, (char *) pixels[i]); + entryPtr = Tcl_FindHashEntry(&cmap->refCounts, INT2PTR(pixels[i])); if (!entryPtr) { Tcl_Panic("Tried to free a color that isn't allocated"); } - refCount = (int) Tcl_GetHashValue(entryPtr) - 1; + refCount = PTR2INT(Tcl_GetHashValue(entryPtr)) - 1; if (refCount == 0) { cref = pixels[i] & 0x00ffffff; index = GetNearestPaletteIndex(cmap->palette, cref); @@ -517,8 +517,8 @@ XCreateColormap( Tcl_InitHashTable(&cmap->refCounts, TCL_ONE_WORD_KEYS); for (i = 0; i < logPalettePtr->palNumEntries; i++) { entryPtr = logPalettePtr->palPalEntry + i; - hashPtr = Tcl_CreateHashEntry(&cmap->refCounts, (char*) PALETTERGB( - entryPtr->peRed, entryPtr->peGreen, entryPtr->peBlue), &new); + hashPtr = Tcl_CreateHashEntry(&cmap->refCounts, INT2PTR(PALETTERGB( + entryPtr->peRed, entryPtr->peGreen, entryPtr->peBlue)), &new); Tcl_SetHashValue(hashPtr, INT2PTR(1)); } diff --git a/win/tkWinPixmap.c b/win/tkWinPixmap.c index 60ce7c2..3827b3b 100644 --- a/win/tkWinPixmap.c +++ b/win/tkWinPixmap.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: tkWinPixmap.c,v 1.12 2010/10/06 14:33:29 nijtmans Exp $ + * RCS: @(#) $Id: tkWinPixmap.c,v 1.13 2010/11/29 09:07:13 nijtmans Exp $ */ #include "tkWinInt.h" @@ -61,7 +61,7 @@ Tk_GetPixmap( screen = &display->screens[0]; planes = 1; if (depth == screen->root_depth) { - planes = (int) screen->ext_data; + planes = PTR2INT(screen->ext_data); depth /= planes; } newTwdPtr->bitmap.handle = diff --git a/win/tkWinScrlbr.c b/win/tkWinScrlbr.c index f5f691d..87edb75 100644 --- a/win/tkWinScrlbr.c +++ b/win/tkWinScrlbr.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: tkWinScrlbr.c,v 1.22 2010/06/19 16:18:41 jenglish Exp $ + * RCS: @(#) $Id: tkWinScrlbr.c,v 1.23 2010/11/29 09:07:13 nijtmans Exp $ */ #include "tkWinInt.h" @@ -248,7 +248,7 @@ CreateProc( scrollPtr->lastVertical = scrollPtr->info.vertical; scrollPtr->oldProc = (WNDPROC)SetWindowLongPtr(scrollPtr->hwnd, - GWLP_WNDPROC, (INT_PTR) ScrollbarProc); + GWLP_WNDPROC, (LONG_PTR) ScrollbarProc); window = Tk_AttachHWND(tkwin, scrollPtr->hwnd); UpdateScrollbar(scrollPtr); @@ -293,7 +293,7 @@ TkpDisplayScrollbar( if (scrollPtr->lastVertical != scrollPtr->info.vertical) { HWND hwnd = Tk_GetHWND(Tk_WindowId(tkwin)); - SetWindowLongPtr(hwnd, GWLP_WNDPROC, (INT_PTR) scrollPtr->oldProc); + SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) scrollPtr->oldProc); DestroyWindow(hwnd); CreateProc(tkwin, Tk_WindowId(Tk_Parent(tkwin)), diff --git a/win/ttkWinMonitor.c b/win/ttkWinMonitor.c index c208245..573faf6 100644 --- a/win/ttkWinMonitor.c +++ b/win/ttkWinMonitor.c @@ -1,4 +1,4 @@ -/* $Id: ttkWinMonitor.c,v 1.17 2010/04/29 15:28:04 nijtmans Exp $ +/* $Id: ttkWinMonitor.c,v 1.18 2010/11/29 09:07:13 nijtmans Exp $ */ #ifdef _MSC_VER @@ -95,7 +95,7 @@ CreateThemeMonitorWindow(HINSTANCE hinst, Tcl_Interp *interp) hwnd = CreateWindow( name, title, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hinst, NULL ); - SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG)interp); + SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) interp); ShowWindow(hwnd, SW_HIDE); UpdateWindow(hwnd); } |