diff options
-rw-r--r-- | generic/tkButton.c | 55 | ||||
-rw-r--r-- | generic/tkCanvImg.c | 16 | ||||
-rw-r--r-- | generic/tkCmds.c | 4 | ||||
-rw-r--r-- | generic/tkEntry.c | 2 | ||||
-rw-r--r-- | generic/tkFrame.c | 2 | ||||
-rw-r--r-- | generic/tkImgPhInstance.c | 17 | ||||
-rw-r--r-- | generic/tkListbox.c | 2 | ||||
-rw-r--r-- | generic/tkMenu.c | 6 | ||||
-rw-r--r-- | generic/tkMenubutton.c | 34 | ||||
-rw-r--r-- | generic/tkMessage.c | 2 | ||||
-rw-r--r-- | generic/tkPanedWindow.c | 8 | ||||
-rw-r--r-- | generic/tkPlace.c | 2 | ||||
-rw-r--r-- | generic/tkScale.c | 2 | ||||
-rw-r--r-- | generic/tkSquare.c | 2 | ||||
-rw-r--r-- | generic/tkTest.c | 6 | ||||
-rw-r--r-- | generic/tkText.c | 2 | ||||
-rw-r--r-- | generic/tkTextImage.c | 2 | ||||
-rw-r--r-- | generic/tkTextTag.c | 2 | ||||
-rw-r--r-- | generic/tkTextWind.c | 2 | ||||
-rw-r--r-- | generic/tkVisual.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXXStubs.c | 2 | ||||
-rw-r--r-- | unix/tkUnixColor.c | 2 | ||||
-rw-r--r-- | unix/tkUnixMenubu.c | 3 | ||||
-rw-r--r-- | unix/tkUnixSelect.c | 4 | ||||
-rw-r--r-- | unix/tkUnixSend.c | 2 | ||||
-rw-r--r-- | unix/tkUnixWm.c | 20 | ||||
-rw-r--r-- | win/tkWinWm.c | 2 | ||||
-rw-r--r-- | win/tkWinX.c | 2 |
28 files changed, 99 insertions, 108 deletions
diff --git a/generic/tkButton.c b/generic/tkButton.c index c5360fa..1dec2fe 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -512,28 +512,28 @@ static const enum command map[][8] = { * Forward declarations for functions defined later in this file: */ -static void ButtonCmdDeletedProc(ClientData clientData); -static int ButtonCreate(ClientData clientData, +static void ButtonCmdDeletedProc(void *clientData); +static int ButtonCreate(void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int type); -static void ButtonEventProc(ClientData clientData, +static void ButtonEventProc(void *clientData, XEvent *eventPtr); -static void ButtonImageProc(ClientData clientData, +static void ButtonImageProc(void *clientData, int x, int y, int width, int height, int imgWidth, int imgHeight); -static void ButtonSelectImageProc(ClientData clientData, +static void ButtonSelectImageProc(void *clientData, int x, int y, int width, int height, int imgWidth, int imgHeight); -static void ButtonTristateImageProc(ClientData clientData, +static void ButtonTristateImageProc(void *clientData, int x, int y, int width, int height, int imgWidth, int imgHeight); -static char * ButtonTextVarProc(ClientData clientData, +static char * ButtonTextVarProc(void *clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); -static char * ButtonVarProc(ClientData clientData, +static char * ButtonVarProc(void *clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); -static int ButtonWidgetObjCmd(ClientData clientData, +static int ButtonWidgetObjCmd(void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int ConfigureButton(Tcl_Interp *interp, TkButton *butPtr, @@ -561,7 +561,7 @@ static void DestroyButton(TkButton *butPtr); int Tk_ButtonObjCmd( - ClientData clientData, /* Either NULL or pointer to option table. */ + void *clientData, /* Either NULL or pointer to option table. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ @@ -571,7 +571,7 @@ Tk_ButtonObjCmd( int Tk_CheckbuttonObjCmd( - ClientData clientData, /* Either NULL or pointer to option table. */ + void *clientData, /* Either NULL or pointer to option table. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ @@ -581,7 +581,7 @@ Tk_CheckbuttonObjCmd( int Tk_LabelObjCmd( - ClientData clientData, /* Either NULL or pointer to option table. */ + void *clientData, /* Either NULL or pointer to option table. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ @@ -591,7 +591,7 @@ Tk_LabelObjCmd( int Tk_RadiobuttonObjCmd( - ClientData clientData, /* Either NULL or pointer to option table. */ + void *clientData, /* Either NULL or pointer to option table. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ @@ -619,7 +619,7 @@ Tk_RadiobuttonObjCmd( static int ButtonCreate( - ClientData dummy, /* NULL. */ + TCL_UNUSED(void *), /* NULL. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[], /* Argument values. */ @@ -632,7 +632,6 @@ ButtonCreate( Tk_Window tkwin; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - (void)dummy; if (!tsdPtr->defaultsInitialized) { TkpButtonSetDefaults(); @@ -775,7 +774,7 @@ ButtonCreate( static int ButtonWidgetObjCmd( - ClientData clientData, /* Information about button widget. */ + void *clientData, /* Information about button widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ @@ -999,7 +998,7 @@ DestroyButton( NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, ButtonVarProc, butPtr); } - Tk_FreeConfigOptions((char *) butPtr, butPtr->optionTable, + Tk_FreeConfigOptions(butPtr, butPtr->optionTable, butPtr->tkwin); butPtr->tkwin = NULL; Tcl_EventuallyFree(butPtr, TCL_DYNAMIC); @@ -1335,7 +1334,7 @@ ConfigureButton( void TkButtonWorldChanged( - ClientData instanceData) /* Information about widget. */ + void *instanceData) /* Information about widget. */ { XGCValues gcValues; GC newGC; @@ -1448,7 +1447,7 @@ TkButtonWorldChanged( static void ButtonEventProc( - ClientData clientData, /* Information about window. */ + void *clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { TkButton *butPtr = (TkButton *)clientData; @@ -1507,7 +1506,7 @@ ButtonEventProc( static void ButtonCmdDeletedProc( - ClientData clientData) /* Pointer to widget record for widget. */ + void *clientData) /* Pointer to widget record for widget. */ { TkButton *butPtr = (TkButton *)clientData; @@ -1597,17 +1596,15 @@ TkInvokeButton( static char * ButtonVarProc( - ClientData clientData, /* Information about button. */ + void *clientData, /* Information about button. */ Tcl_Interp *interp, /* Interpreter containing variable. */ - const char *name1, /* Name of variable. */ - const char *name2, /* Second part of variable name. */ + TCL_UNUSED(const char *), /* Name of variable. */ + TCL_UNUSED(const char *), /* Second part of variable name. */ int flags) /* Information about what happened. */ { TkButton *butPtr = (TkButton *)clientData; const char *value; Tcl_Obj *valuePtr; - (void)name1; - (void)name2; /* * If the variable is being unset, then just re-establish the trace unless @@ -1708,7 +1705,7 @@ ButtonVarProc( static char * ButtonTextVarProc( - ClientData clientData, /* Information about button. */ + void *clientData, /* Information about button. */ Tcl_Interp *interp, /* Interpreter containing variable. */ const char *name1, /* Not used. */ const char *name2, /* Not used. */ @@ -1804,7 +1801,7 @@ ButtonTextVarProc( static void ButtonImageProc( - ClientData clientData, /* Pointer to widget record. */ + void *clientData, /* Pointer to widget record. */ int x, int y, /* Upper left pixel (within image) that must * be redisplayed. */ int width, int height, /* Dimensions of area to redisplay (might be @@ -1848,7 +1845,7 @@ ButtonImageProc( static void ButtonSelectImageProc( - ClientData clientData, /* Pointer to widget record. */ + void *clientData, /* Pointer to widget record. */ int x, int y, /* Upper left pixel (within image) that must * be redisplayed. */ int width, int height, /* Dimensions of area to redisplay (might be @@ -1901,7 +1898,7 @@ ButtonSelectImageProc( static void ButtonTristateImageProc( - ClientData clientData, /* Pointer to widget record. */ + void *clientData, /* Pointer to widget record. */ int x, int y, /* Upper left pixel (within image) that must * be redisplayed. */ int width, int height, /* Dimensions of area to redisplay (might be diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c index 120ae6f..e6128bb 100644 --- a/generic/tkCanvImg.c +++ b/generic/tkCanvImg.c @@ -70,7 +70,7 @@ static const Tk_ConfigSpec configSpecs[] = { * Prototypes for functions defined in this file: */ -static void ImageChangedProc(ClientData clientData, +static void ImageChangedProc(void *clientData, int x, int y, int width, int height, int imgWidth, int imgHeight); static int ImageCoords(Tcl_Interp *interp, @@ -380,13 +380,11 @@ ConfigureImage( static void DeleteImage( - Tk_Canvas canvas, /* Info about overall canvas widget. */ + TCL_UNUSED(Tk_Canvas), /* Info about overall canvas widget. */ Tk_Item *itemPtr, /* Item that is being deleted. */ - Display *display) /* Display containing window for canvas. */ + TCL_UNUSED(Display *)) /* Display containing window for canvas. */ { ImageItem *imgPtr = (ImageItem *) itemPtr; - (void)canvas; - (void)display; if (imgPtr->imageString != NULL) { ckfree(imgPtr->imageString); @@ -591,13 +589,12 @@ DisplayImage( static double ImageToPoint( - Tk_Canvas canvas, /* Canvas containing item. */ + TCL_UNUSED(Tk_Canvas), /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against point. */ double *coordPtr) /* Pointer to x and y coordinates. */ { ImageItem *imgPtr = (ImageItem *) itemPtr; double x1, x2, y1, y2, xDiff, yDiff; - (void)canvas; x1 = imgPtr->header.x1; y1 = imgPtr->header.y1; @@ -648,14 +645,13 @@ ImageToPoint( static int ImageToArea( - Tk_Canvas canvas, /* Canvas containing item. */ + TCL_UNUSED(Tk_Canvas), /* Canvas containing item. */ Tk_Item *itemPtr, /* Item to check against rectangle. */ double *rectPtr) /* Pointer to array of four coordinates * (x1,y1,x2,y2) describing rectangular * area. */ { ImageItem *imgPtr = (ImageItem *) itemPtr; - (void)canvas; if ((rectPtr[2] <= imgPtr->header.x1) || (rectPtr[0] >= imgPtr->header.x2) @@ -885,7 +881,7 @@ TranslateImage( static void ImageChangedProc( - ClientData clientData, /* Pointer to canvas item for image. */ + void *clientData, /* Pointer to canvas item for image. */ int x, int y, /* Upper left pixel (within image) that must * be redisplayed. */ int width, int height, /* Dimensions of area to redisplay (may be <= diff --git a/generic/tkCmds.c b/generic/tkCmds.c index 1bf7b03..ff73952 100644 --- a/generic/tkCmds.c +++ b/generic/tkCmds.c @@ -383,7 +383,7 @@ Tk_BindtagsObjCmd( } else { for (i = 0; i < winPtr->numTags; i++) { Tcl_ListObjAppendElement(NULL, listPtr, - Tcl_NewStringObj((char *) winPtr->tagPtr[i], TCL_INDEX_NONE)); + Tcl_NewStringObj(winPtr->tagPtr[i], TCL_INDEX_NONE)); } } Tcl_SetObjResult(interp, listPtr); @@ -1838,7 +1838,7 @@ Tk_WinfoObjCmd( Tcl_ListObjAppendElement(NULL, resultPtr, strPtr); } Tcl_SetObjResult(interp, resultPtr); - XFree((char *) visInfoPtr); + XFree(visInfoPtr); break; } } diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 04162e3..92080e4 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -1080,7 +1080,7 @@ DestroyEntry( } } Tk_FreeTextLayout(entryPtr->textLayout); - Tk_FreeConfigOptions((char *) entryPtr, entryPtr->optionTable, + Tk_FreeConfigOptions(entryPtr, entryPtr->optionTable, entryPtr->tkwin); Tcl_Release(entryPtr->tkwin); entryPtr->tkwin = NULL; diff --git a/generic/tkFrame.c b/generic/tkFrame.c index 82e33c4..b3135c1 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -953,7 +953,7 @@ DestroyFramePartly( labelframePtr->labelWin = NULL; } - Tk_FreeConfigOptions((char *) framePtr, framePtr->optionTable, + Tk_FreeConfigOptions(framePtr, framePtr->optionTable, framePtr->tkwin); } diff --git a/generic/tkImgPhInstance.c b/generic/tkImgPhInstance.c index 47d402a..f498d95 100644 --- a/generic/tkImgPhInstance.c +++ b/generic/tkImgPhInstance.c @@ -52,7 +52,7 @@ static int CountBits(unsigned mask); static void GetColorTable(PhotoInstance *instancePtr); static void FreeColorTable(ColorTable *colorPtr, int force); static void AllocateColors(ColorTable *colorPtr); -static void DisposeColorTable(ClientData clientData); +static void DisposeColorTable(void *clientData); static int ReclaimColors(ColorTableId *id, int numColors); /* @@ -218,7 +218,7 @@ ClientData TkImgPhotoGet( Tk_Window tkwin, /* Window in which the instance will be * used. */ - ClientData modelData) /* Pointer to our model structure for the + void *modelData) /* Pointer to our model structure for the * image. */ { PhotoModel *modelPtr = (PhotoModel *)modelData; @@ -366,7 +366,7 @@ TkImgPhotoGet( nRed = 1 << visInfoPtr->depth; break; } - XFree((char *) visInfoPtr); + XFree(visInfoPtr); if (mono) { snprintf(buf, sizeof(buf), "%d", nRed); @@ -630,7 +630,7 @@ BlendComplexAlpha( void TkImgPhotoDisplay( - ClientData clientData, /* Pointer to PhotoInstance structure for + void *clientData, /* Pointer to PhotoInstance structure for * instance to be displayed. */ Display *display, /* Display on which to draw image. */ Drawable drawable, /* Pixmap or window in which to draw image. */ @@ -756,14 +756,13 @@ TkImgPhotoDisplay( void TkImgPhotoFree( - ClientData clientData, /* Pointer to PhotoInstance structure for + void *clientData, /* Pointer to PhotoInstance structure for * instance to be displayed. */ - Display *display) /* Display containing window that used + TCL_UNUSED(Display *)) /* Display containing window that used * image. */ { PhotoInstance *instancePtr = (PhotoInstance *)clientData; ColorTable *colorPtr; - (void)display; if (instancePtr->refCount-- > 1) { return; @@ -1479,7 +1478,7 @@ AllocateColors( static void DisposeColorTable( - ClientData clientData) /* Pointer to the ColorTable whose + void *clientData) /* Pointer to the ColorTable whose * colors are to be released. */ { ColorTable *colorPtr = (ColorTable *)clientData; @@ -1613,7 +1612,7 @@ ReclaimColors( void TkImgDisposeInstance( - ClientData clientData) /* Pointer to the instance whose resources are + void *clientData) /* Pointer to the instance whose resources are * to be released. */ { PhotoInstance *instancePtr = (PhotoInstance *)clientData; diff --git a/generic/tkListbox.c b/generic/tkListbox.c index 351bd0c..35fb494 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.c @@ -1496,7 +1496,7 @@ DestroyListbox( Tk_FreeBitmap(Tk_Display(listPtr->tkwin), listPtr->gray); } - Tk_FreeConfigOptions((char *) listPtr, listPtr->optionTable, + Tk_FreeConfigOptions(listPtr, listPtr->optionTable, listPtr->tkwin); Tcl_Release(listPtr->tkwin); listPtr->tkwin = NULL; diff --git a/generic/tkMenu.c b/generic/tkMenu.c index eacdffb..3a7280e 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -1232,7 +1232,7 @@ DestroyMenuInstance( } Tcl_DeleteHashTable(&menuPtr->items); TkMenuFreeDrawOptions(menuPtr); - Tk_FreeConfigOptions((char *) menuPtr, + Tk_FreeConfigOptions(menuPtr, tsdPtr->menuOptionTable, menuPtr->tkwin); if (menuPtr->tkwin != NULL) { Tk_Window tkwin = menuPtr->tkwin; @@ -1506,7 +1506,7 @@ DestroyMenuEntry( } TkpDestroyMenuEntry(mePtr); TkMenuEntryFreeDrawOptions(mePtr); - Tk_FreeConfigOptions((char *) mePtr, mePtr->optionTable, menuPtr->tkwin); + Tk_FreeConfigOptions(mePtr, mePtr->optionTable, menuPtr->tkwin); ckfree(mePtr); } @@ -2358,7 +2358,7 @@ MenuNewEntry( mePtr->entryPtr = NULL; TkMenuInitializeEntryDrawingFields(mePtr); if (TkpMenuNewEntry(mePtr) != TCL_OK) { - Tk_FreeConfigOptions((char *) mePtr, mePtr->optionTable, + Tk_FreeConfigOptions(mePtr, mePtr->optionTable, menuPtr->tkwin); ckfree(mePtr); return NULL; diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c index df63f9b..4b12724 100644 --- a/generic/tkMenubutton.c +++ b/generic/tkMenubutton.c @@ -155,22 +155,22 @@ enum command { * Forward declarations for functions defined later in this file: */ -static void MenuButtonCmdDeletedProc(ClientData clientData); -static void MenuButtonEventProc(ClientData clientData, +static void MenuButtonCmdDeletedProc(void *clientData); +static void MenuButtonEventProc(void *clientData, XEvent *eventPtr); -static void MenuButtonImageProc(ClientData clientData, +static void MenuButtonImageProc(void *clientData, int x, int y, int width, int height, int imgWidth, int imgHeight); -static char * MenuButtonTextVarProc(ClientData clientData, +static char * MenuButtonTextVarProc(void *clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); -static int MenuButtonWidgetObjCmd(ClientData clientData, +static int MenuButtonWidgetObjCmd(void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int ConfigureMenuButton(Tcl_Interp *interp, TkMenuButton *mbPtr, int objc, Tcl_Obj *const objv[]); -static void DestroyMenuButton(char *memPtr); +static void DestroyMenuButton(void *memPtr); /* *-------------------------------------------------------------- @@ -192,7 +192,7 @@ static void DestroyMenuButton(char *memPtr); int Tk_MenubuttonObjCmd( - ClientData dummy, /* NULL. */ + void *dummy, /* NULL. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -323,7 +323,7 @@ Tk_MenubuttonObjCmd( static int MenuButtonWidgetObjCmd( - ClientData clientData, /* Information about button widget. */ + void *clientData, /* Information about button widget. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -401,9 +401,9 @@ MenuButtonWidgetObjCmd( static void DestroyMenuButton( - char *memPtr) /* Info about button widget. */ + void *memPtr) /* Info about button widget. */ { - TkMenuButton *mbPtr = (TkMenuButton *) memPtr; + TkMenuButton *mbPtr = (TkMenuButton *)memPtr; TkpDestroyMenuButton(mbPtr); if (mbPtr->flags & REDRAW_PENDING) { @@ -442,7 +442,7 @@ DestroyMenuButton( if (mbPtr->textLayout != NULL) { Tk_FreeTextLayout(mbPtr->textLayout); } - Tk_FreeConfigOptions((char *) mbPtr, mbPtr->optionTable, mbPtr->tkwin); + Tk_FreeConfigOptions(mbPtr, mbPtr->optionTable, mbPtr->tkwin); mbPtr->tkwin = NULL; Tcl_EventuallyFree(mbPtr, TCL_DYNAMIC); } @@ -651,7 +651,7 @@ ConfigureMenuButton( void TkMenuButtonWorldChanged( - ClientData instanceData) /* Information about widget. */ + void *instanceData) /* Information about widget. */ { XGCValues gcValues; GC gc; @@ -754,7 +754,7 @@ TkMenuButtonWorldChanged( static void MenuButtonEventProc( - ClientData clientData, /* Information about window. */ + void *clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { TkMenuButton *mbPtr = (TkMenuButton *)clientData; @@ -769,7 +769,7 @@ MenuButtonEventProc( goto redraw; } else if (eventPtr->type == DestroyNotify) { - DestroyMenuButton((char *) mbPtr); + DestroyMenuButton(mbPtr); } else if (eventPtr->type == FocusIn) { if (eventPtr->xfocus.detail != NotifyInferior) { mbPtr->flags |= GOT_FOCUS; @@ -814,7 +814,7 @@ MenuButtonEventProc( static void MenuButtonCmdDeletedProc( - ClientData clientData) /* Pointer to widget record for widget. */ + void *clientData) /* Pointer to widget record for widget. */ { TkMenuButton *mbPtr = (TkMenuButton *)clientData; Tk_Window tkwin = mbPtr->tkwin; @@ -851,7 +851,7 @@ MenuButtonCmdDeletedProc( static char * MenuButtonTextVarProc( - ClientData clientData, /* Information about button. */ + void *clientData, /* Information about button. */ Tcl_Interp *interp, /* Interpreter containing variable. */ const char *name1, /* Name of variable. */ const char *name2, /* Second part of variable name. */ @@ -939,7 +939,7 @@ MenuButtonTextVarProc( static void MenuButtonImageProc( - ClientData clientData, /* Pointer to widget record. */ + void *clientData, /* Pointer to widget record. */ int x, int y, /* Upper left pixel (within image) that must * be redisplayed. */ int width, int height, /* Dimensions of area to redisplay (may be <= diff --git a/generic/tkMessage.c b/generic/tkMessage.c index cb37082..4fb0439 100644 --- a/generic/tkMessage.c +++ b/generic/tkMessage.c @@ -421,7 +421,7 @@ DestroyMessage( TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, MessageTextVarProc, msgPtr); } - Tk_FreeConfigOptions((char *) msgPtr, msgPtr->optionTable, msgPtr->tkwin); + Tk_FreeConfigOptions(msgPtr, msgPtr->optionTable, msgPtr->tkwin); msgPtr->tkwin = NULL; ckfree(msgPtr); } diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 64e26c5..c83d100 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -891,7 +891,7 @@ ConfigurePanes( "window \"%s\" is not managed by %s", Tk_PathName(tkwin), Tk_PathName(pwPtr->tkwin))); Tcl_SetErrorCode(interp, "TK", "PANEDWINDOW", "UNMANAGED", NULL); - Tk_FreeConfigOptions((char *) &options, pwPtr->paneOpts, + Tk_FreeConfigOptions(&options, pwPtr->paneOpts, pwPtr->tkwin); return TCL_ERROR; } @@ -1066,7 +1066,7 @@ ConfigurePanes( pwPtr->numPanes += numNewPanes; - Tk_FreeConfigOptions((char *) &options, pwPtr->paneOpts, pwPtr->tkwin); + Tk_FreeConfigOptions(&options, pwPtr->paneOpts, pwPtr->tkwin); ComputeGeometry(pwPtr); return TCL_OK; @@ -1582,7 +1582,7 @@ DestroyPanedWindow( Tk_DeleteEventHandler(pwPtr->panes[i]->tkwin, StructureNotifyMask, PaneStructureProc, pwPtr->panes[i]); Tk_ManageGeometry(pwPtr->panes[i]->tkwin, NULL, NULL); - Tk_FreeConfigOptions((char *) pwPtr->panes[i], pwPtr->paneOpts, + Tk_FreeConfigOptions(pwPtr->panes[i], pwPtr->paneOpts, pwPtr->tkwin); ckfree(pwPtr->panes[i]); pwPtr->panes[i] = NULL; @@ -1601,7 +1601,7 @@ DestroyPanedWindow( * Let Tk_FreeConfigOptions clean up the rest. */ - Tk_FreeConfigOptions((char *) pwPtr, pwPtr->optionTable, pwPtr->tkwin); + Tk_FreeConfigOptions(pwPtr, pwPtr->optionTable, pwPtr->tkwin); Tcl_Release(pwPtr->tkwin); pwPtr->tkwin = NULL; diff --git a/generic/tkPlace.c b/generic/tkPlace.c index adb20e9..774ad79 100644 --- a/generic/tkPlace.c +++ b/generic/tkPlace.c @@ -428,7 +428,7 @@ FreeContent( if (contentPtr->containerPtr && (contentPtr->containerPtr->flags & PARENT_RECONFIG_PENDING)) { Tcl_CancelIdleCall(RecomputePlacement, contentPtr->containerPtr); } - Tk_FreeConfigOptions((char *) contentPtr, contentPtr->optionTable, + Tk_FreeConfigOptions(contentPtr, contentPtr->optionTable, contentPtr->tkwin); ckfree(contentPtr); } diff --git a/generic/tkScale.c b/generic/tkScale.c index e61b943..9748b2a 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -561,7 +561,7 @@ DestroyScale( if (scalePtr->textGC != NULL) { Tk_FreeGC(scalePtr->display, scalePtr->textGC); } - Tk_FreeConfigOptions((char *) scalePtr, scalePtr->optionTable, + Tk_FreeConfigOptions(scalePtr, scalePtr->optionTable, scalePtr->tkwin); scalePtr->tkwin = NULL; TkpDestroyScale(scalePtr); diff --git a/generic/tkSquare.c b/generic/tkSquare.c index b459148..f115c93 100644 --- a/generic/tkSquare.c +++ b/generic/tkSquare.c @@ -397,7 +397,7 @@ SquareObjEventProc( } } else if (eventPtr->type == DestroyNotify) { if (squarePtr->tkwin != NULL) { - Tk_FreeConfigOptions((char *) squarePtr, squarePtr->optionTable, + Tk_FreeConfigOptions(squarePtr, squarePtr->optionTable, squarePtr->tkwin); if (squarePtr->gc != NULL) { Tk_FreeGC(squarePtr->display, squarePtr->gc); diff --git a/generic/tkTest.c b/generic/tkTest.c index b3b7146..bafd7e6 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -94,7 +94,7 @@ static int ImageCreate(Tcl_Interp *interp, const char *name, Tcl_Size objc, Tcl_Obj *const objv[], const Tk_ImageType *typePtr, Tk_ImageModel model, void **clientDataPtr); -static ClientData ImageGet(Tk_Window tkwin, void *clientData); +static void *ImageGet(Tk_Window tkwin, void *clientData); static void ImageDisplay(void *clientData, Display *display, Drawable drawable, int imageX, int imageY, int width, @@ -782,7 +782,7 @@ TestobjconfigObjCmd( result = Tk_SetOptions(interp, recordPtr, optionTable, objc-3, objv+3, tkwin, NULL, NULL); if (result != TCL_OK) { - Tk_FreeConfigOptions((char *) recordPtr, optionTable, tkwin); + Tk_FreeConfigOptions(recordPtr, optionTable, tkwin); } } if (result == TCL_OK) { @@ -1504,7 +1504,7 @@ ImageObjCmd( *---------------------------------------------------------------------- */ -static ClientData +static void * ImageGet( Tk_Window tkwin, /* Token for window in which image will be * used. */ diff --git a/generic/tkText.c b/generic/tkText.c index 867e878..665fe54 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -2507,7 +2507,7 @@ TextEventProc( textPtr->setGrid = 0; } if (!(textPtr->flags & OPTIONS_FREED)) { - Tk_FreeConfigOptions((char *) textPtr, textPtr->optionTable, + Tk_FreeConfigOptions(textPtr, textPtr->optionTable, textPtr->tkwin); textPtr->flags |= OPTIONS_FREED; } diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c index f7c6f4d..3544f92 100644 --- a/generic/tkTextImage.c +++ b/generic/tkTextImage.c @@ -457,7 +457,7 @@ EmbImageDeleteProc( * options. */ - Tk_FreeConfigOptions((char *) &eiPtr->body.ei, eiPtr->body.ei.optionTable, + Tk_FreeConfigOptions(&eiPtr->body.ei, eiPtr->body.ei.optionTable, NULL); if (eiPtr->body.ei.name) { ckfree(eiPtr->body.ei.name); diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c index 0965a5b..70eb0a5 100644 --- a/generic/tkTextTag.c +++ b/generic/tkTextTag.c @@ -1344,7 +1344,7 @@ TkTextFreeTag( * Let Tk do most of the hard work for us. */ - Tk_FreeConfigOptions((char *) tagPtr, tagPtr->optionTable, + Tk_FreeConfigOptions(tagPtr, tagPtr->optionTable, textPtr->tkwin); /* diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c index 38ebc80..954e16f 100644 --- a/generic/tkTextWind.c +++ b/generic/tkTextWind.c @@ -756,7 +756,7 @@ EmbWinDeleteProc( } ewPtr->body.ew.clients = NULL; - Tk_FreeConfigOptions((char *) &ewPtr->body.ew, ewPtr->body.ew.optionTable, + Tk_FreeConfigOptions(&ewPtr->body.ew, ewPtr->body.ew.optionTable, NULL); /* diff --git a/generic/tkVisual.c b/generic/tkVisual.c index 799cdbf..bda0c4b 100644 --- a/generic/tkVisual.c +++ b/generic/tkVisual.c @@ -306,7 +306,7 @@ Tk_GetVisual( CLANG_ASSERT(bestPtr); *depthPtr = bestPtr->depth; visual = bestPtr->visual; - XFree((char *) visInfoList); + XFree(visInfoList); /* * If we need to find a colormap for this visual, do it now. If the visual diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c index 76b8b33..3e7d839 100644 --- a/macosx/tkMacOSXXStubs.c +++ b/macosx/tkMacOSXXStubs.c @@ -198,7 +198,7 @@ TkpOpenDisplay( NSAutoreleasePool *pool = [NSAutoreleasePool new]; - display = XkbOpenDisplay((char *)display_name, NULL, NULL, NULL, NULL, NULL); + display = XkbOpenDisplay(display_name, NULL, NULL, NULL, NULL, NULL); /* * Initialize screen bits that may change diff --git a/unix/tkUnixColor.c b/unix/tkUnixColor.c index 8965ab6..20149a3 100644 --- a/unix/tkUnixColor.c +++ b/unix/tkUnixColor.c @@ -289,7 +289,7 @@ FindClosestColor( } stressPtr->numColors = visInfoPtr->colormap_size; - XFree((char *) visInfoPtr); + XFree(visInfoPtr); stressPtr->colorPtr = (XColor *) ckalloc((size_t)stressPtr->numColors * sizeof(XColor)); for (i = 0; i < stressPtr->numColors; i++) { diff --git a/unix/tkUnixMenubu.c b/unix/tkUnixMenubu.c index 27cbef4..7795ba6 100644 --- a/unix/tkUnixMenubu.c +++ b/unix/tkUnixMenubu.c @@ -317,9 +317,8 @@ TkpDisplayMenuButton( void TkpDestroyMenuButton( - TkMenuButton *mbPtr) + TCL_UNUSED(TkMenuButton *)) { - (void)mbPtr; } /* diff --git a/unix/tkUnixSelect.c b/unix/tkUnixSelect.c index db9fa96..13c2b30 100644 --- a/unix/tkUnixSelect.c +++ b/unix/tkUnixSelect.c @@ -879,7 +879,7 @@ ConvertSelection( if ((result != Success) || (bytesAfter != 0) || (format != 32) || (type == None)) { if (incr.multAtoms != NULL) { - XFree((char *) incr.multAtoms); + XFree(incr.multAtoms); } goto refuse; } @@ -1087,7 +1087,7 @@ ConvertSelection( ckfree(incr.converts); if (multiple) { - XFree((char *) incr.multAtoms); + XFree(incr.multAtoms); } return; diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c index d02697a..397cd50 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.c @@ -760,7 +760,7 @@ ServerSecure( #endif /* FamilyServerInterpreted */ } if (addrPtr != NULL) { - XFree((char *) addrPtr); + XFree(addrPtr); } return secure; #endif /* TK_NO_SECURITY */ diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index d28f723..8fe1cc2 100644 --- a/unix/tkUnixWm.c +++ b/unix/tkUnixWm.c @@ -720,7 +720,7 @@ TkWmMapWindow( XSetWMClientMachine(winPtr->display, wmPtr->wrapperPtr->window, &textProp); - XFree((char *) textProp.value); + XFree(textProp.value); /* * Inform the server (and more particularly any session @@ -992,7 +992,7 @@ TkWmSetClass( classPtr->res_class = Tcl_DStringValue(&ds); XSetClassHint(winPtr->display, winPtr->wmInfoPtr->wrapperPtr->window, classPtr); - XFree((char *) classPtr); + XFree(classPtr); Tcl_DStringFree(&name); Tcl_DStringFree(&ds); } @@ -1501,7 +1501,7 @@ WmClientCmd( XSetWMClientMachine(winPtr->display, wmPtr->wrapperPtr->window, &textProp); - XFree((char *) textProp.value); + XFree(textProp.value); /* * Inform the server (and more particularly any session manager) @@ -1579,7 +1579,7 @@ WmColormapwindowsCmd( Tcl_NewStringObj(winPtr2->pathName, TCL_INDEX_NONE)); } } - XFree((char *) cmapList); + XFree(cmapList); Tcl_SetObjResult(interp, resultObj); return TCL_OK; } @@ -4222,7 +4222,7 @@ ReparentEvent( "ReparentEvent got bogus VROOT property:", actualFormat, numItems); } - XFree((char *) virtualRootPtr); + XFree(virtualRootPtr); } Tk_DeleteErrorHandler(handler); @@ -4273,7 +4273,7 @@ ReparentEvent( Tk_DeleteErrorHandler(handler); goto noReparent; } - XFree((char *) children); + XFree(children); if ((ancestor == vRoot) || (ancestor == RootWindow(wrapperPtr->display, wrapperPtr->screenNum))) { @@ -4941,7 +4941,7 @@ UpdateSizeHints( XSetWMNormalHints(winPtr->display, wmPtr->wrapperPtr->window, hintsPtr); - XFree((char *) hintsPtr); + XFree(hintsPtr); } /* @@ -6524,7 +6524,7 @@ TkWmStackorderToplevel( *window_ptr = NULL; if (numChildren) { - XFree((char *) children); + XFree(children); } } @@ -6698,7 +6698,7 @@ TkWmAddToColormapWindows( count+1); ckfree(newPtr); if (oldPtr != NULL) { - XFree((char *) oldPtr); + XFree(oldPtr); } } @@ -6794,7 +6794,7 @@ TkWmRemoveFromColormapWindows( break; } } - XFree((char *) oldPtr); + XFree(oldPtr); } /* diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 24e6034..9987651 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -3249,7 +3249,7 @@ WmClientCmd( != 0) { XSetWMClientMachine(winPtr->display, winPtr->window, &textProp); - XFree((char *) textProp.value); + XFree(textProp.value); } } return TCL_OK; diff --git a/win/tkWinX.c b/win/tkWinX.c index d9834e9..80407df 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -550,7 +550,7 @@ TkpOpenDisplay( } } - display = XkbOpenDisplay((char *)display_name, NULL, NULL, NULL, NULL, NULL); + display = XkbOpenDisplay(display_name, NULL, NULL, NULL, NULL, NULL); TkWinDisplayChanged(display); tsdPtr->winDisplay =(TkDisplay *) ckalloc(sizeof(TkDisplay)); |