diff --git a/generic/tk.h b/generic/tk.h index 21d0d23f6..004cd84c7 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -1197,7 +1197,7 @@ typedef struct Tk_Outline { Tk_Dash dash; /* Dash pattern. */ Tk_Dash activeDash; /* Dash pattern if state is active. */ Tk_Dash disabledDash; /* Dash pattern if state is disabled. */ - Tcl_Obj *offsetObj; /* Dash offset. */ + Tcl_Obj *offsetObj; /* Dash offset. */ void *reserved2; /* Reserved for future expansion. */ void *reserved3; Tk_TSOffset tsoffset; /* Stipple offset for outline. */ diff --git a/generic/tkCmds.c b/generic/tkCmds.c index 81c459dcb..d9de4c2f4 100644 --- a/generic/tkCmds.c +++ b/generic/tkCmds.c @@ -1776,11 +1776,11 @@ Tk_WinfoObjCmd( { Colormap temp = Tk_Colormap(tkwin); Tk_Colormap(tkwin) = TK_DYNAMIC_COLORMAP; - colorPtr = Tk_GetColor(interp, tkwin, Tcl_GetString(objv[3])); + colorPtr = Tk_AllocColorFromObj(interp, tkwin, objv[3]); Tk_Colormap(tkwin) = temp; } #else - colorPtr = Tk_GetColor(interp, tkwin, Tcl_GetString(objv[3])); + colorPtr = Tk_AllocColorFromObj(interp, tkwin, objv[3]); #endif if (colorPtr == NULL) { return TCL_ERROR; diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 5b4602745..01eae00c8 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -1668,8 +1668,8 @@ ParseSubcommandOptions( goto oneValueRequired; } *optIndexPtr = ++index; - optPtr->background = Tk_GetColor(interp, Tk_MainWindow(interp), - Tcl_GetString(objv[index])); + optPtr->background = Tk_AllocColorFromObj(interp, Tk_MainWindow(interp), + objv[index]); if (!optPtr->background) { return TCL_ERROR; } diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index 425919c4b..f2368acf0 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.c @@ -464,7 +464,7 @@ Tk_ChooseColorObjCmd( case COLOR_INITIAL: { XColor *colorPtr; - colorPtr = Tk_GetColor(interp, tkwin, value); + colorPtr = Tk_AllocColorFromObj(interp, tkwin, objv[i + 1]); if (colorPtr == NULL) { goto end; } diff --git a/unix/tkUnixScrlbr.c b/unix/tkUnixScrlbr.c index 9907ffb5b..8a198f63f 100644 --- a/unix/tkUnixScrlbr.c +++ b/unix/tkUnixScrlbr.c @@ -102,9 +102,8 @@ TkpDisplayScrollbar( XPoint points[7]; Tk_3DBorder border; int relief, width, elementBorderWidth; - int highlightWidth; + int borderWidth, highlightWidth; Pixmap pixmap; - int borderWidth; if ((scrollPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) { goto done; diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 0b0494bab..efd3a4bc6 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -760,7 +760,7 @@ Tk_ChooseColorObjCmd( case COLOR_INITIAL: { XColor *colorPtr; - colorPtr = Tk_GetColor(interp, tkwin, string); + colorPtr = Tk_AllocColorFromObj(interp, tkwin, valuePtr); if (colorPtr == NULL) { return TCL_ERROR; } diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 8aef4fa85..c2d168306 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -3070,7 +3070,7 @@ WmAttributesCmd( } wmPtr->alpha = dval; } else { /* -transparentcolor */ - const char *crefstr = Tcl_GetStringFromObj(objv[i+1], &length); + (void)Tcl_GetStringFromObj(objv[i+1], &length); if (length == 0) { /* reset to no transparent color */ @@ -3080,7 +3080,7 @@ WmAttributesCmd( } } else { XColor *cPtr = - Tk_GetColor(interp, tkwin, crefstr); + Tk_AllocColorFromObj(interp, tkwin, objv[i+1]); if (cPtr == NULL) { return TCL_ERROR; }