diff options
Diffstat (limited to 'generic/tkOldTest.c')
-rw-r--r-- | generic/tkOldTest.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/generic/tkOldTest.c b/generic/tkOldTest.c index 948883d..50d036d 100644 --- a/generic/tkOldTest.c +++ b/generic/tkOldTest.c @@ -106,9 +106,10 @@ static int ImageObjCmd(ClientData dummy, int TkOldTestInit( - Tcl_Interp *interp) + Tcl_Interp *dummy) { static int initialized = 0; + (void)dummy; if (!initialized) { initialized = 1; @@ -151,6 +152,7 @@ ImageCreate( TImageMaster *timPtr; const char *varName; int i; + (void)typePtr; varName = "log"; for (i = 0; i < argc; i += 2) { @@ -167,14 +169,14 @@ ImageCreate( varName = argv[i+1]; } - timPtr = ckalloc(sizeof(TImageMaster)); + timPtr = (TImageMaster *)ckalloc(sizeof(TImageMaster)); timPtr->master = master; timPtr->interp = interp; timPtr->width = 30; timPtr->height = 15; - timPtr->imageName = ckalloc(strlen(name) + 1); + timPtr->imageName = (char *)ckalloc(strlen(name) + 1); strcpy(timPtr->imageName, name); - timPtr->varName = ckalloc(strlen(varName) + 1); + timPtr->varName = (char *)ckalloc(strlen(varName) + 1); strcpy(timPtr->varName, varName); Tcl_CreateObjCommand(interp, name, ImageObjCmd, timPtr, NULL); *clientDataPtr = timPtr; @@ -207,7 +209,7 @@ ImageObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument strings. */ { - TImageMaster *timPtr = clientData; + TImageMaster *timPtr = (TImageMaster *)clientData; int x, y, width, height; if (objc < 2) { @@ -262,7 +264,7 @@ ImageGet( * used. */ ClientData clientData) /* Pointer to TImageMaster for image. */ { - TImageMaster *timPtr = clientData; + TImageMaster *timPtr = (TImageMaster *)clientData; TImageInstance *instPtr; char buffer[100]; XGCValues gcValues; @@ -271,7 +273,7 @@ ImageGet( Tcl_SetVar2(timPtr->interp, timPtr->varName, NULL, buffer, TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT); - instPtr = ckalloc(sizeof(TImageInstance)); + instPtr = (TImageInstance *)ckalloc(sizeof(TImageInstance)); instPtr->masterPtr = timPtr; instPtr->fg = Tk_GetColor(timPtr->interp, tkwin, "#ff0000"); gcValues.foreground = instPtr->fg->pixel; @@ -309,7 +311,7 @@ ImageDisplay( /* Coordinates in drawable corresponding to * imageX and imageY. */ { - TImageInstance *instPtr = clientData; + TImageInstance *instPtr = (TImageInstance *)clientData; char buffer[200 + TCL_INTEGER_SPACE * 6]; sprintf(buffer, "%s display %d %d %d %d %d %d", @@ -354,7 +356,7 @@ ImageFree( ClientData clientData, /* Pointer to TImageInstance for instance. */ Display *display) /* Display where image was to be drawn. */ { - TImageInstance *instPtr = clientData; + TImageInstance *instPtr = (TImageInstance *)clientData; char buffer[200]; sprintf(buffer, "%s free", instPtr->masterPtr->imageName); @@ -388,7 +390,7 @@ ImageDelete( * this function is called, no more instances * exist. */ { - TImageMaster *timPtr = clientData; + TImageMaster *timPtr = (TImageMaster *)clientData; char buffer[100]; sprintf(buffer, "%s delete", timPtr->imageName); |