Debian Codegraph @

debian/patches/pointertoint.patch

raw symbols SCIP
1 Descriptionscip-debian debian blt 2.5.3+dfsg-10 blt/patches/`pointertoint.patch`#Description.: Patch adds explicit casts to intptr_t or uintptr_t types
2 to prevent casting to/from pointer from/to integers of different size.
3 Authorscip-debian debian blt 2.5.3+dfsg-10 blt/patches/`pointertoint.patch`#Author.: Sergei Golovan
4 Last-Modifiedscip-debian debian blt 2.5.3+dfsg-10 blt/patches/`pointertoint.patch`#Last-Modified.: Wed, 09 Jul 2014 19:20:07 +0400
5
6 --- a/generic/bltBgexec.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltBgexec.c`:
7 +++ b/generic/bltBgexec.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltBgexec.c`:
8 @@ -668,7 +668,7 @@
9 sinkPtr->name = name;
10 sinkPtr->echo = FALSE;
11 sinkPtr->fd = -1;
12 - sinkPtr->file = (Tcl_File)NULL;
13 + sinkPtr->file = (Tcl_File)0;
14 sinkPtr->byteArr = sinkPtr->staticSpace;
15 sinkPtr->size = DEF_BUFFER_SIZE;
16 sinkPtr->encoding = encoding;
17 @@ -726,7 +726,7 @@
18 Blt_Free(sinkPtr->byteArr);
19 }
20 sinkPtr->fd = -1;
21 - sinkPtr->file = (Tcl_File)NULL;
22 + sinkPtr->file = (Tcl_File)0;
23 #if (TCL_MAJOR_VERSION >= 8)
24 if (sinkPtr->objv != NULL) {
25 register int i;
26 @@ -883,7 +883,7 @@
27 #else
28 Tcl_DeleteFileHandler(sinkPtr->fd);
29 #endif
30 - sinkPtr->file = (Tcl_File)NULL;
31 + sinkPtr->file = (Tcl_File)0;
32 sinkPtr->fd = -1;
33
34 #if WINDEBUG
35 --- a/generic/bltTree.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltTree.c`:
36 +++ b/generic/bltTree.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltTree.c`:
37 @@ -424,7 +424,7 @@
38 TreeDestroyValues(nodePtr);
39 UnlinkNode(nodePtr);
40 treeObjPtr->nNodes--;
41 - hPtr = Blt_FindHashEntry(&treeObjPtr->nodeTable, (char *)nodePtr->inode);
42 + hPtr = Blt_FindHashEntry(&treeObjPtr->nodeTable, (char *)(intptr_t)nodePtr->inode);
43 assert(hPtr);
44 Blt_DeleteHashEntry(&treeObjPtr->nodeTable, hPtr);
45 nodePtr->inode = -1;
46 @@ -934,7 +934,7 @@
47 /* Generate an unique serial number for this node. */
48 do {
49 inode = treeObjPtr->nextInode++;
50 - hPtr = Blt_CreateHashEntry(&treeObjPtr->nodeTable,(char *)inode,
51 + hPtr = Blt_CreateHashEntry(&treeObjPtr->nodeTable,(char *)(intptr_t)inode,
52 &isNew);
53 } while (!isNew);
54 nodePtr = NewNode(treeObjPtr, name, inode);
55 @@ -1030,7 +1030,7 @@
56 int isNew, result;
57
58 treeObjPtr = parentPtr->treeObject;
59 - hPtr = Blt_CreateHashEntry(&treeObjPtr->nodeTable,(char *)inode, &isNew);
60 + hPtr = Blt_CreateHashEntry(&treeObjPtr->nodeTable,(char *)(intptr_t)inode, &isNew);
61 if (!isNew) {
62 return NULL;
63 }
64 @@ -1166,7 +1166,7 @@
65 TreeObject *treeObjPtr = clientPtr->treeObject;
66 Blt_HashEntry *hPtr;
67
68 - hPtr = Blt_FindHashEntry(&treeObjPtr->nodeTable, (char *)inode);
69 + hPtr = Blt_FindHashEntry(&treeObjPtr->nodeTable, (char *)(intptr_t)inode);
70 if (hPtr != NULL) {
71 return (Blt_TreeNode)Blt_GetHashValue(hPtr);
72 }
73 @@ -1179,7 +1179,7 @@
74 {
75 Blt_HashEntry *hPtr;
76
77 - hPtr = Blt_FindHashEntry(&treeObjPtr->nodeTable, (char *)inode);
78 + hPtr = Blt_FindHashEntry(&treeObjPtr->nodeTable, (char *)(intptr_t)inode);
79 if (hPtr != NULL) {
80 return (Node*)Blt_GetHashValue(hPtr);
81 }
82 --- a/generic/bltTreeCmd.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltTreeCmd.c`:
83 +++ b/generic/bltTreeCmd.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltTreeCmd.c`:
84 @@ -1641,7 +1641,7 @@
85 if (parentId == -1) { /* Dump marks root's parent as -1. */
86 node = dataPtr->root;
87 /* Create a mapping between the old id and the new node */
88 - hPtr = Blt_CreateHashEntry(&dataPtr->idTable, (char *)nodeId,
89 + hPtr = Blt_CreateHashEntry(&dataPtr->idTable, (char *)(intptr_t)nodeId,
90 &isNew);
91 Blt_SetHashValue(hPtr, node);
92 Blt_TreeRelabelNode(cmdPtr->tree, node, names[0]);
93 @@ -1651,7 +1651,7 @@
94 * This can happen when there's a id collision with an
95 * existing node.
96 */
97 - hPtr = Blt_FindHashEntry(&dataPtr->idTable, (char *)parentId);
98 + hPtr = Blt_FindHashEntry(&dataPtr->idTable, (char *)(intptr_t)parentId);
99 if (hPtr != NULL) {
100 parent = Blt_GetHashValue(hPtr);
101 } else {
102 @@ -1688,7 +1688,7 @@
103 if (dataPtr->flags & RESTORE_OVERWRITE &&
104 ((node = Blt_TreeFindChild(parent, names[nNames - 1])))) {
105 /* Create a mapping between the old id and the new node */
106 - hPtr = Blt_CreateHashEntry(&dataPtr->idTable, (char *)nodeId,
107 + hPtr = Blt_CreateHashEntry(&dataPtr->idTable, (char *)(intptr_t)nodeId,
108 &isNew);
109 Blt_SetHashValue(hPtr, node);
110 }
111 @@ -1698,7 +1698,7 @@
112 node = Blt_TreeCreateNode(cmdPtr->tree, parent,
113 names[nNames - 1], -1);
114 /* Create a mapping between the old id and the new node */
115 - hPtr = Blt_CreateHashEntry(&dataPtr->idTable, (char *)nodeId,
116 + hPtr = Blt_CreateHashEntry(&dataPtr->idTable, (char *)(intptr_t)nodeId,
117 &isNew);
118 Blt_SetHashValue(hPtr, node);
119 } else {
120 @@ -2196,7 +2196,7 @@
121 for (node = Blt_ListFirstNode(patternList); node != NULL;
122 node = Blt_ListNextNode(node)) {
123
124 - type = (int)Blt_ListGetValue(node);
125 + type = (intptr_t)Blt_ListGetValue(node);
126 pattern = (char *)Blt_ListGetKey(node);
127 switch (type) {
128 case 0:
129 @@ -3654,7 +3654,7 @@
130 for (hPtr = Blt_FirstHashEntry(tablePtr, &cursor);
131 hPtr != NULL; hPtr = Blt_NextHashEntry(&cursor)) {
132 node = Blt_GetHashValue(hPtr);
133 - Blt_ChainAppend(chainPtr, (ClientData)Blt_TreeNodeId(node));
134 + Blt_ChainAppend(chainPtr, (ClientData)(intptr_t)Blt_TreeNodeId(node));
135 }
136 /*
137 * Iterate through this list to delete the nodes. By
138 @@ -3664,7 +3664,7 @@
139 for (linkPtr = Blt_ChainFirstLink(chainPtr); linkPtr != NULL;
140 linkPtr = nextPtr) {
141 nextPtr = Blt_ChainNextLink(linkPtr);
142 - inode = (int)Blt_ChainGetValue(linkPtr);
143 + inode = (intptr_t)Blt_ChainGetValue(linkPtr);
144 node = Blt_TreeGetNode(cmdPtr->tree, inode);
145 if (node != NULL) {
146 DeleteNode(cmdPtr, node);
147 --- a/generic/bltUnixPipe.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltUnixPipe.c`:
148 +++ b/generic/bltUnixPipe.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltUnixPipe.c`:
149 @@ -508,7 +508,7 @@
150 * Reap the child process now if an error occurred during its
151 * startup.
152 */
153 - Tcl_WaitPid((Tcl_Pid)pid, &status, WNOHANG);
154 + Tcl_WaitPid((Tcl_Pid)(intptr_t)pid, &status, WNOHANG);
155 }
156 if (errPipeIn >= 0) {
157 CloseFile(errPipeIn);
158 --- a/generic/bltUtil.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltUtil.c`:
159 +++ b/generic/bltUtil.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltUtil.c`:
160 @@ -827,10 +827,10 @@
161 if (isNew) {
162 refCount = 0;
163 } else {
164 - refCount = (int)Blt_GetHashValue(hPtr);
165 + refCount = (intptr_t)Blt_GetHashValue(hPtr);
166 }
167 refCount++;
168 - Blt_SetHashValue(hPtr, (ClientData)refCount);
169 + Blt_SetHashValue(hPtr, (intptr_t)refCount);
170 return (Blt_Uid)Blt_GetHashKey(&uidTable, hPtr);
171 }
172
173 @@ -864,12 +864,12 @@
174 if (hPtr) {
175 int refCount;
176
177 - refCount = (int)Blt_GetHashValue(hPtr);
178 + refCount = (intptr_t)Blt_GetHashValue(hPtr);
179 refCount--;
180 if (refCount == 0) {
181 Blt_DeleteHashEntry(&uidTable, hPtr);
182 } else {
183 - Blt_SetHashValue(hPtr, (ClientData)refCount);
184 + Blt_SetHashValue(hPtr, (intptr_t)refCount);
185 }
186 } else {
187 fprintf(stderr, "tried to release unknown identifier \"%s\"\n", uid);
188 --- a/generic/bltInit.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltInit.c`:
189 +++ b/generic/bltInit.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltInit.c`:
190 @@ -514,7 +514,7 @@
191 int dostub = 0;
192 #endif
193
194 - flags = (int)Tcl_GetAssocData(interp, BLT_THREAD_KEY, NULL);
195 + flags = (intptr_t)Tcl_GetAssocData(interp, BLT_THREAD_KEY, NULL);
196 if ((flags & BLT_TCL_CMDS) == 0) {
197 register Tcl_AppInitProc **p;
198 Tcl_Namespace *nsPtr;
199 @@ -573,7 +573,7 @@
200 }
201 #endif
202 Tcl_SetAssocData(interp, BLT_THREAD_KEY, NULL,
203 - (ClientData)(flags | BLT_TCL_CMDS));
204 + (ClientData)(intptr_t)(flags | BLT_TCL_CMDS));
205 }
206 #ifndef TCL_ONLY
207 if ((flags & BLT_TK_CMDS) == 0) {
208 @@ -609,7 +609,7 @@
209 }
210 Blt_InitEpsCanvasItem(interp);
211 Tcl_SetAssocData(interp, BLT_THREAD_KEY, NULL,
212 - (ClientData)(flags | BLT_TK_CMDS));
213 + (ClientData)(intptr_t)(flags | BLT_TK_CMDS));
214 }
215 #endif
216 return TCL_OK;
217 --- a/generic/bltGrAxis.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltGrAxis.c`:
218 +++ b/generic/bltGrAxis.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltGrAxis.c`:
219 @@ -669,7 +669,7 @@
220 char *widgRec; /* Pointer to structure record. */
221 int offset; /* Offset of field in structure. */
222 {
223 - unsigned int mask = (unsigned int)clientData;
224 + unsigned int mask = (uintptr_t)clientData;
225 Axis *axisPtr = (Axis *)widgRec;
226 Ticks **ticksPtrPtr = (Ticks **) (widgRec + offset);
227 int nTicks;
228 @@ -3687,7 +3687,7 @@
229 int margin;
230
231 /* TODO: fix bug where "$g xaxis x2" leaves x unavailable. */
232 - margin = (int)argv[-1];
233 + margin = (intptr_t)argv[-1];
234 chainPtr = graphPtr->margins[margin].axes;
235 if (argc == 0) {
236 for (linkPtr = Blt_ChainFirstLink(chainPtr); linkPtr!= NULL;
237 @@ -4231,7 +4231,7 @@
238 return TCL_ERROR;
239 }
240 if (proc == UseOp) {
241 - argv[2] = (char *)margin; /* Hack. Slide a reference to the margin in
242 + argv[2] = (char *)(intptr_t)margin; /* Hack. Slide a reference to the margin in
243 * the argument list. Needed only for UseOp.
244 */
245 result = (*proc)(graphPtr, NULL, argc - 3, argv +3);
246 --- a/generic/bltGrBar.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltGrBar.c`:
247 +++ b/generic/bltGrBar.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltGrBar.c`:
248 @@ -2197,13 +2197,13 @@
249 if (isNew) {
250 count = 1;
251 } else {
252 - count = (int)Blt_GetHashValue(hPtr);
253 + count = (intptr_t)Blt_GetHashValue(hPtr);
254 if (count == 1) {
255 nStacks++;
256 }
257 count++;
258 }
259 - Blt_SetHashValue(hPtr, (ClientData)count);
260 + Blt_SetHashValue(hPtr, (ClientData)(intptr_t)count);
261 }
262 }
263 if (nSegs == 0) {
264 @@ -2219,12 +2219,12 @@
265 infoPtr = graphPtr->freqArr;
266 for (hPtr = Blt_FirstHashEntry(&freqTable, &cursor); hPtr != NULL;
267 hPtr = Blt_NextHashEntry(&cursor)) {
268 - count = (int)Blt_GetHashValue(hPtr);
269 + count = (intptr_t)Blt_GetHashValue(hPtr);
270 keyPtr = (FreqKey *)Blt_GetHashKey(&freqTable, hPtr);
271 if (count > 1) {
272 h2Ptr = Blt_CreateHashEntry(&(graphPtr->freqTable),
273 (char *)keyPtr, &isNew);
274 - count = (int)Blt_GetHashValue(hPtr);
275 + count = (intptr_t)Blt_GetHashValue(hPtr);
276 infoPtr->freq = count;
277 infoPtr->axes = keyPtr->axes;
278 Blt_SetHashValue(h2Ptr, infoPtr);
279 --- a/generic/bltGrMisc.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltGrMisc.c`:
280 +++ b/generic/bltGrMisc.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltGrMisc.c`:
281 @@ -260,7 +260,7 @@
282 {
283 ColorPair *pairPtr = (ColorPair *)(widgRec + offset);
284 ColorPair sample;
285 - int allowDefault = (int)clientData;
286 + int allowDefault = (intptr_t)clientData;
287
288 sample.fgColor = sample.bgColor = NULL;
289 if ((string != NULL) && (*string != '\0')) {
290 --- a/generic/bltConfig.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltConfig.c`:
291 +++ b/generic/bltConfig.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltConfig.c`:
292 @@ -442,7 +442,7 @@
293 char *widgRec; /* Cubicle structure record */
294 int offset; /* Offset of style in record */
295 {
296 - unsigned int mask = (unsigned int)clientData; /* Bit to be tested */
297 + unsigned int mask = (uintptr_t)clientData; /* Bit to be tested */
298 int *flagPtr = (int *)(widgRec + offset);
299 int bool;
300
301 @@ -478,7 +478,7 @@
302 int offset; /* Offset of fill in widget record */
303 Tcl_FreeProc **freeProcPtr; /* Not Used. */
304 {
305 - unsigned int mask = (unsigned int)clientData; /* Bit to be tested */
306 + unsigned int mask = (uintptr_t)clientData; /* Bit to be tested */
307 unsigned int bool = *(unsigned int *)(widgRec + offset);
308
309 return (bool & mask) ? "1" : "0";
310 @@ -559,7 +559,7 @@
311 int offset; /* Offset of pixel size in record */
312 {
313 int *valuePtr = (int *)(widgRec + offset);
314 - return Blt_GetPixels(interp, tkwin, string, (int)clientData, valuePtr);
315 + return Blt_GetPixels(interp, tkwin, string, (intptr_t)clientData, valuePtr);
316 }
317
318 /*
319 @@ -648,7 +648,7 @@
320 int offset; /* Offset of pixel size in record */
321 {
322 int *valuePtr = (int *)(widgRec + offset);
323 - return Blt_GetInt(interp, string, (int)clientData, valuePtr);
324 + return Blt_GetInt(interp, string, (intptr_t)clientData, valuePtr);
325 }
326
327 /*
328 --- a/generic/bltContainer.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltContainer.c`:
329 +++ b/generic/bltContainer.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltContainer.c`:
330 @@ -822,7 +822,7 @@
331 char *widgRec; /* Widget record */
332 int offset; /* Offset to field in structure */
333 {
334 - unsigned int flags = (int)clientData;
335 + unsigned int flags = (uintptr_t)clientData;
336 Container *cntrPtr = (Container *)widgRec;
337 Window *winPtr = (Window *) (widgRec + offset);
338 Tk_Window tkAdopted;
339 --- a/generic/bltHierbox.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltHierbox.c`:
340 +++ b/generic/bltHierbox.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltHierbox.c`:
341 @@ -2077,7 +2077,7 @@
342 /* Generate a unique node serial number. */
343 do {
344 serial = hboxPtr->nextSerial++;
345 - hPtr = Blt_CreateHashEntry(&(hboxPtr->nodeTable), (char *)serial,
346 + hPtr = Blt_CreateHashEntry(&(hboxPtr->nodeTable), (char *)(intptr_t)serial,
347 &isNew);
348 } while (!isNew);
349 Blt_SetHashValue(hPtr, treePtr);
350 @@ -2372,7 +2372,7 @@
351 if (Tcl_GetInt(NULL, string, &serial) == TCL_OK) {
352 Blt_HashEntry *hPtr;
353
354 - hPtr = Blt_FindHashEntry(&(hboxPtr->nodeTable), (char *)serial);
355 + hPtr = Blt_FindHashEntry(&(hboxPtr->nodeTable), (char *)(intptr_t)serial);
356 if (hPtr != NULL) {
357 return (Tree *) Blt_GetHashValue(hPtr);
358 }
359 @@ -2406,7 +2406,7 @@
360 int serial;
361
362 /* Node table keys are integers. Convert them to strings. */
363 - serial = (int)Blt_GetHashKey(&(hboxPtr->nodeTable),
364 + serial = (intptr_t)Blt_GetHashKey(&(hboxPtr->nodeTable),
365 nodePtr->entryPtr->hashPtr);
366 sprintf(string, "%d", serial);
367
368 --- a/generic/bltUnixImage.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltUnixImage.c`:
369 +++ b/generic/bltUnixImage.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltUnixImage.c`:
370 @@ -574,7 +574,7 @@
371 destPtr = Blt_ColorImageBits(image);
372 endPtr = destPtr + nPixels;
373 for (/* empty */; destPtr < endPtr; destPtr++) {
374 - hPtr = Blt_FindHashEntry(&pixelTable, (char *)destPtr->value);
375 + hPtr = Blt_FindHashEntry(&pixelTable, (char *)(intptr_t)destPtr->value);
376 colorPtr = (XColor *)Blt_GetHashValue(hPtr);
377 destPtr->Red = lut[colorPtr->red >> 8];
378 destPtr->Green = lut[colorPtr->green >> 8];
379 --- a/generic/bltTable.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltTable.c`:
380 +++ b/generic/bltTable.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltTable.c`:
381 @@ -2034,7 +2034,7 @@
382 key = 0; /* Initialize key to bogus span */
383 for (node = Blt_ListFirstNode(list); node != NULL;
384 node = Blt_ListNextNode(node)) {
385 - key = (int)Blt_ListGetKey(node);
386 + key = (intptr_t)Blt_ListGetKey(node);
387 if (entryPtr->row.span <= key) {
388 break;
389 }
390 @@ -2046,7 +2046,7 @@
391 * Create a new list (bucket) to hold entries of that size
392 * span and and link it into the list of buckets.
393 */
394 - newNode = Blt_ListCreateNode(list, (char *)entryPtr->row.span);
395 + newNode = Blt_ListCreateNode(list, (char *)(intptr_t)entryPtr->row.span);
396 Blt_ListSetValue(newNode, (char *)Blt_ChainCreate());
397 Blt_ListLinkBefore(list, newNode, node);
398 node = newNode;
399 @@ -2063,7 +2063,7 @@
400 key = 0;
401 for (node = Blt_ListFirstNode(list); node != NULL;
402 node = Blt_ListNextNode(node)) {
403 - key = (int)Blt_ListGetKey(node);
404 + key = (intptr_t)Blt_ListGetKey(node);
405 if (entryPtr->column.span <= key) {
406 break;
407 }
408 @@ -2075,7 +2075,7 @@
409 * Create a new list (bucket) to hold entries of that size
410 * span and and link it into the list of buckets.
411 */
412 - newNode = Blt_ListCreateNode(list, (char *)entryPtr->column.span);
413 + newNode = Blt_ListCreateNode(list, (char *)(intptr_t)entryPtr->column.span);
414 Blt_ListSetValue(newNode, (char *)Blt_ChainCreate());
415 Blt_ListLinkBefore(list, newNode, node);
416 node = newNode;
417 --- a/generic/bltTreeView.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltTreeView.c`:
418 +++ b/generic/bltTreeView.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltTreeView.c`:
419 @@ -1314,10 +1314,10 @@
420 if (isNew) {
421 refCount = 1;
422 } else {
423 - refCount = (int)Blt_GetHashValue(hPtr);
424 + refCount = (intptr_t)Blt_GetHashValue(hPtr);
425 refCount++;
426 }
427 - Blt_SetHashValue(hPtr, (ClientData)refCount);
428 + Blt_SetHashValue(hPtr, (ClientData)(intptr_t)refCount);
429 return Blt_GetHashKey(&tvPtr->uidTable, hPtr);
430 }
431
432 @@ -1343,10 +1343,10 @@
433
434 hPtr = Blt_FindHashEntry(&tvPtr->uidTable, uid);
435 assert(hPtr != NULL);
436 - refCount = (int)Blt_GetHashValue(hPtr);
437 + refCount = (intptr_t)Blt_GetHashValue(hPtr);
438 refCount--;
439 if (refCount > 0) {
440 - Blt_SetHashValue(hPtr, (ClientData)refCount);
441 + Blt_SetHashValue(hPtr, (ClientData)(intptr_t)refCount);
442 } else {
443 Blt_DeleteHashEntry(&tvPtr->uidTable, hPtr);
444 }
445 --- a/generic/bltTreeViewCmd.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltTreeViewCmd.c`:
446 +++ b/generic/bltTreeViewCmd.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltTreeViewCmd.c`:
447 @@ -516,7 +516,7 @@
448
449 if ((context == ITEM_ENTRY) ||
450 (context == ITEM_ENTRY_BUTTON) ||
451 - ((unsigned int)context >= (unsigned int)ITEM_STYLE)) {
452 + ((uintptr_t)context >= (uintptr_t)ITEM_STYLE)) {
453 entryPtr = Blt_GetCurrentItem(tvPtr->bindTable);
454 }
455 }
456 --- a/generic/bltWinop.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltWinop.c`:
457 +++ b/generic/bltWinop.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltWinop.c`:
458 @@ -980,9 +980,9 @@
459 if (isNew) {
460 Blt_SetHashValue(hPtr, 1);
461 } else {
462 - cnt = (int)Blt_GetHashValue(hPtr);
463 + cnt = (intptr_t)Blt_GetHashValue(hPtr);
464 cnt++;
465 - Blt_SetHashValue(hPtr, cnt);
466 + Blt_SetHashValue(hPtr, (intptr_t)cnt);
467 }
468 srcPtr++;
469 }
470 @@ -994,7 +994,7 @@
471 Tcl_Obj *objPtr = Tcl_NewStringObj(Blt_GetHashKey(&hTbl, hPtr), -1);
472 Tcl_ListObjAppendElement(interp, listPtr, objPtr);
473 if (iscnt) {
474 - cnt = (int)Blt_GetHashValue(hPtr);
475 + cnt = (intptr_t)Blt_GetHashValue(hPtr);
476 sprintf(buf, "%d", cnt);
477 objPtr = Tcl_NewStringObj(buf, -1);
478 Tcl_ListObjAppendElement(interp, listPtr, objPtr);
479 --- a/generic/bltObjConfig.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltObjConfig.c`:
480 +++ b/generic/bltObjConfig.cscip-debian debian blt 2.5.3+dfsg-10 blt/upstream/`generic/bltObjConfig.c`:
481 @@ -1338,7 +1338,7 @@
482 if (Tcl_GetBooleanFromObj(interp, objPtr, &bool) != TCL_OK) {
483 return TCL_ERROR;
484 }
485 - flag = (unsigned int)specPtr->customPtr;
486 + flag = (uintptr_t)specPtr->customPtr;
487 *(int *)ptr &= ~flag;
488 if (bool) {
489 *(int *)ptr |= flag;
490 @@ -1639,7 +1639,7 @@
491 {
492 unsigned int flag;
493
494 - flag = (*(int *)ptr) & (unsigned int)specPtr->customPtr;
495 + flag = (*(unsigned int *)ptr) & (uintptr_t)specPtr->customPtr;
496 return Tcl_NewBooleanObj((flag != 0));
497 }
498