summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-16 13:03:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-16 13:03:43 (GMT)
commit3876ba4df3e26ded567937787afa2068b9815626 (patch)
treec4452046a4a872fb20c9437f5719b664baca41d7 /generic
parentaf28c015d3494e872c4094934f33251157662310 (diff)
parent664a327665c85de251423f7a679879e8382041c8 (diff)
downloadtk-3876ba4df3e26ded567937787afa2068b9815626.zip
tk-3876ba4df3e26ded567937787afa2068b9815626.tar.gz
tk-3876ba4df3e26ded567937787afa2068b9815626.tar.bz2
[Bug 3388350] mingw64 compiler warnings
Diffstat (limited to 'generic')
-rw-r--r--generic/tkAtom.c18
-rw-r--r--generic/tkSelect.c6
2 files changed, 12 insertions, 12 deletions
diff --git a/generic/tkAtom.c b/generic/tkAtom.c
index 85d3748..54d3598 100644
--- a/generic/tkAtom.c
+++ b/generic/tkAtom.c
@@ -93,11 +93,11 @@ Tk_InternAtom(
Atom atom;
atom = XInternAtom(dispPtr->display, name, False);
- Tcl_SetHashValue(hPtr, atom);
- hPtr2 = Tcl_CreateHashEntry(&dispPtr->atomTable, (char*) atom, &isNew);
+ Tcl_SetHashValue(hPtr, INT2PTR(atom));
+ hPtr2 = Tcl_CreateHashEntry(&dispPtr->atomTable, INT2PTR(atom), &isNew);
Tcl_SetHashValue(hPtr2, Tcl_GetHashKey(&dispPtr->nameTable, hPtr));
}
- return (Atom) Tcl_GetHashValue(hPtr);
+ return (Atom) PTR2INT(Tcl_GetHashValue(hPtr));
}
/*
@@ -135,7 +135,7 @@ Tk_GetAtomName(
AtomInit(dispPtr);
}
- hPtr = Tcl_FindHashEntry(&dispPtr->atomTable, (char *) atom);
+ hPtr = Tcl_FindHashEntry(&dispPtr->atomTable, INT2PTR(atom));
if (hPtr == NULL) {
char *name;
Tk_ErrorHandler handler;
@@ -151,12 +151,12 @@ Tk_GetAtomName(
}
Tk_DeleteErrorHandler(handler);
hPtr = Tcl_CreateHashEntry(&dispPtr->nameTable, name, &isNew);
- Tcl_SetHashValue(hPtr, atom);
+ Tcl_SetHashValue(hPtr, INT2PTR(atom));
if (mustFree) {
XFree(name);
}
name = Tcl_GetHashKey(&dispPtr->nameTable, hPtr);
- hPtr = Tcl_CreateHashEntry(&dispPtr->atomTable, (char *) atom, &isNew);
+ hPtr = Tcl_CreateHashEntry(&dispPtr->atomTable, INT2PTR(atom), &isNew);
Tcl_SetHashValue(hPtr, name);
}
return Tcl_GetHashValue(hPtr);
@@ -193,16 +193,16 @@ AtomInit(
char *name;
int isNew;
- hPtr = Tcl_FindHashEntry(&dispPtr->atomTable, (char *) atom);
+ hPtr = Tcl_FindHashEntry(&dispPtr->atomTable, INT2PTR(atom));
if (hPtr != NULL) {
continue;
}
name = atomNameArray[atom - 1];
hPtr = Tcl_CreateHashEntry(&dispPtr->nameTable, name, &isNew);
- Tcl_SetHashValue(hPtr, atom);
+ Tcl_SetHashValue(hPtr, INT2PTR(atom));
name = Tcl_GetHashKey(&dispPtr->nameTable, hPtr);
- hPtr = Tcl_CreateHashEntry(&dispPtr->atomTable, (char *) atom, &isNew);
+ hPtr = Tcl_CreateHashEntry(&dispPtr->atomTable, INT2PTR(atom), &isNew);
Tcl_SetHashValue(hPtr, name);
}
}
diff --git a/generic/tkSelect.c b/generic/tkSelect.c
index aaea5d3..7c96b94 100644
--- a/generic/tkSelect.c
+++ b/generic/tkSelect.c
@@ -170,7 +170,7 @@ Tk_CreateSelHandler(
selPtr->size = 32;
}
- if ((target == XA_STRING) && (winPtr->dispPtr->utf8Atom != (Atom) NULL)) {
+ if ((target == XA_STRING) && (winPtr->dispPtr->utf8Atom != (Atom) 0)) {
/*
* If the user asked for a STRING handler and we understand
* UTF8_STRING, we implicitly create a UTF8_STRING handler for them.
@@ -283,7 +283,7 @@ Tk_DeleteSelHandler(
prevPtr->nextPtr = selPtr->nextPtr;
}
- if ((target == XA_STRING) && (winPtr->dispPtr->utf8Atom != (Atom) NULL)) {
+ if ((target == XA_STRING) && (winPtr->dispPtr->utf8Atom != (Atom) 0)) {
/*
* If the user asked for a STRING handler and we understand
* UTF8_STRING, we may have implicitly created a UTF8_STRING handler
@@ -1193,7 +1193,7 @@ TkSelInit(
#if !(defined(__WIN32__) || defined(MAC_OSX_TK))
dispPtr->utf8Atom = Tk_InternAtom(tkwin, "UTF8_STRING");
#else
- dispPtr->utf8Atom = (Atom) NULL;
+ dispPtr->utf8Atom = (Atom) 0;
#endif
}