Skip to content

Commit

Permalink
Remove a few unneeded shadowed variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Oct 5, 2023
1 parent 5ee78e2 commit 64ccc2d
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions generic/itclBuiltin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1725,7 +1725,6 @@ ItclUnknownGuts(
}
val = NULL;
if ((idmPtr != NULL) && (idmPtr->icPtr != NULL)) {
Tcl_Obj *objPtr;
/* we cannot use Itcl_GetInstanceVar here as the object is not
* yet completely built. So use the varNsNamePtr
*/
Expand Down Expand Up @@ -2210,7 +2209,6 @@ ItclExtendedConfigure(
hPtr = Tcl_FindHashEntry(&contextIoPtr->objectDelegatedOptions, (char *)
objv[1]);
if (hPtr == NULL) {
Tcl_Obj *objPtr;
objPtr = Tcl_NewStringObj("*",1);
Tcl_IncrRefCount(objPtr);
/* check if all options are delegated */
Expand Down
1 change: 0 additions & 1 deletion generic/itclEnsemble.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,6 @@ CreateEnsemble(
* command.
*/
if (parentEnsData == NULL) {
Tcl_Obj *unkObjPtr;
ensData->cmdPtr = Tcl_CreateEnsemble(interp, ensName,
Tcl_GetCurrentNamespace(interp), TCL_ENSEMBLE_PREFIX);
hPtr = Tcl_CreateHashEntry(&infoPtr->ensembleInfo->ensembles,
Expand Down
2 changes: 1 addition & 1 deletion generic/itclInfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,7 @@ Itcl_BiInfoUnknownCmd(

if (usage) {
/* produce usage message */
Tcl_Obj *objPtr = Tcl_NewStringObj(
objPtr = Tcl_NewStringObj(
"wrong # args: should be one of...\n", TCL_INDEX_NONE);
ItclGetInfoUsage(interp, objPtr, (ItclObjectInfo *)clientData, NULL);
Tcl_SetObjResult(interp, objPtr);
Expand Down
1 change: 0 additions & 1 deletion generic/itclMethod.c
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,6 @@ Itcl_InvokeMethodIfExists(
if (objc > 0) {
if (contextClassPtr->numOptions == 0) {
/* check if all options are delegeted */
Tcl_Obj *objPtr;
objPtr = Tcl_NewStringObj("*", TCL_INDEX_NONE);
hPtr = Tcl_FindHashEntry(
&contextClassPtr->delegatedOptions,
Expand Down
2 changes: 1 addition & 1 deletion generic/itclObject.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ ItclCreateObject(
}

if (iclsPtr->flags & (ITCL_TYPE|ITCL_WIDGETADAPTOR)) {
Tcl_Obj *objPtr = Tcl_NewObj();
objPtr = Tcl_NewObj();
Tcl_GetCommandFullName(interp, ioPtr->accessCmd, objPtr);
if (iclsPtr->flags & ITCL_WIDGETADAPTOR) {
/* skip over the leading :: */
Expand Down

0 comments on commit 64ccc2d

Please sign in to comment.