diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-05-08 19:48:13 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-05-08 19:48:13 (GMT) |
commit | 89e3f088ee7a864f5034e4e88615c248dea16821 (patch) | |
tree | d77dfd09c4f4b2d11feaa6bce0a60f51cb8a2016 /generic/tkCanvas.c | |
parent | 818335dd361fb6a08f3c162346143814a5afaf80 (diff) | |
download | tk-89e3f088ee7a864f5034e4e88615c248dea16821.zip tk-89e3f088ee7a864f5034e4e88615c248dea16821.tar.gz tk-89e3f088ee7a864f5034e4e88615c248dea16821.tar.bz2 |
Unnecessary type-casts
Diffstat (limited to 'generic/tkCanvas.c')
-rw-r--r-- | generic/tkCanvas.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 0e4e872..9a7e938 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -267,7 +267,7 @@ static void CanvasWorldChanged(ClientData instanceData); static int ConfigureCanvas(Tcl_Interp *interp, TkCanvas *canvasPtr, int argc, Tcl_Obj *const *argv, int flags); -static void DestroyCanvas(char *memPtr); +static void DestroyCanvas(void *memPtr); static void DisplayCanvas(ClientData clientData); static void DoItem(Tcl_Obj *accumObj, Tk_Item *itemPtr, Tk_Uid tag); @@ -963,7 +963,7 @@ CanvasWidgetCmd( goto done; } } else { - object = (ClientData) searchPtr->expr->uid; + object = (void *)searchPtr->expr->uid; } #endif /* USE_OLD_TAG_SEARCH */ @@ -2168,9 +2168,9 @@ CanvasWidgetCmd( static void DestroyCanvas( - char *memPtr) /* Info about canvas widget. */ + void *memPtr) /* Info about canvas widget. */ { - TkCanvas *canvasPtr = (TkCanvas *) memPtr; + TkCanvas *canvasPtr = (TkCanvas *)memPtr; Tk_Item *itemPtr; #ifndef USE_OLD_TAG_SEARCH TagSearchExpr *expr, *next; @@ -4248,7 +4248,7 @@ DoItem( itemPtr->tagSpace += 5; newTagPtr = (Tk_Uid *)ckalloc(itemPtr->tagSpace * sizeof(Tk_Uid)); - memcpy((void *) newTagPtr, itemPtr->tagPtr, + memcpy(newTagPtr, itemPtr->tagPtr, itemPtr->numTags * sizeof(Tk_Uid)); if (itemPtr->tagPtr != itemPtr->staticTagSpace) { ckfree(itemPtr->tagPtr); @@ -5185,17 +5185,17 @@ CanvasDoEvent( if (numObjects <= NUM_STATIC) { objectPtr = staticObjects; } else { - objectPtr = ckalloc(numObjects * sizeof(ClientData)); + objectPtr = (void **)ckalloc(numObjects * sizeof(void *)); } #ifdef USE_OLD_TAG_SEARCH - objectPtr[0] = (ClientData) Tk_GetUid("all"); + objectPtr[0] = (void *)Tk_GetUid("all"); #else /* USE_OLD_TAG_SEARCH */ - objectPtr[0] = (ClientData) searchUids->allUid; + objectPtr[0] = (void *)searchUids->allUid; #endif /* USE_OLD_TAG_SEARCH */ - for (i = itemPtr->numTags-1; i >= 0; i--) { - objectPtr[i+1] = (ClientData) itemPtr->tagPtr[i]; + for (i = itemPtr->numTags - 1; i >= 0; i--) { + objectPtr[i+1] = (void *)itemPtr->tagPtr[i]; } - objectPtr[itemPtr->numTags+1] = itemPtr; + objectPtr[itemPtr->numTags + 1] = itemPtr; #ifndef USE_OLD_TAG_SEARCH /* |