summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-28 10:13:51 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-28 10:13:51 (GMT)
commitf6bf85fb67eb15e637ecf7c7de4f661dc0557b43 (patch)
tree60462ca1b3918744f06fa3526fb19a09b1b6507b /generic/tclExecute.c
parent866a79313bc49a69a821448e49bc9a67c97393bb (diff)
downloadtcl-f6bf85fb67eb15e637ecf7c7de4f661dc0557b43.zip
tcl-f6bf85fb67eb15e637ecf7c7de4f661dc0557b43.tar.gz
tcl-f6bf85fb67eb15e637ecf7c7de4f661dc0557b43.tar.bz2
Make Tcl compile warning-free using -Wshadow
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 4d92468..b8e9312 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -1407,7 +1407,7 @@ int
Tcl_ExprObj(
Tcl_Interp *interp, /* Context in which to evaluate the
* expression. */
- register Tcl_Obj *objPtr, /* Points to Tcl object containing expression
+ Tcl_Obj *objPtr, /* Points to Tcl object containing expression
* to evaluate. */
Tcl_Obj **resultPtrPtr) /* Where the Tcl_Obj* that is the expression
* result is stored if no errors occur. */
@@ -1526,7 +1526,7 @@ CompileExprObj(
Interp *iPtr = (Interp *) interp;
CompileEnv compEnv; /* Compilation environment structure allocated
* in frame. */
- register ByteCode *codePtr = NULL;
+ ByteCode *codePtr = NULL;
/* Tcl Internal type of bytecode. Initialized
* to avoid compiler warning. */
@@ -1680,8 +1680,8 @@ TclCompileObj(
const CmdFrame *invoker,
int word)
{
- register Interp *iPtr = (Interp *) interp;
- register ByteCode *codePtr; /* Tcl Internal type of bytecode. */
+ Interp *iPtr = (Interp *) interp;
+ ByteCode *codePtr; /* Tcl Internal type of bytecode. */
Namespace *namespacePtr = iPtr->varFramePtr->nsPtr;
/*
@@ -6806,8 +6806,8 @@ TEBCresume(
if (valuePtr->typePtr == &tclBooleanType) {
objResultPtr = TCONST(1);
} else {
- int result = (TclSetBooleanFromAny(NULL, valuePtr) == TCL_OK);
- objResultPtr = TCONST(result);
+ int res = (TclSetBooleanFromAny(NULL, valuePtr) == TCL_OK);
+ objResultPtr = TCONST(res);
}
TRACE_WITH_OBJ(("\"%.30s\" => ", O2S(valuePtr)), objResultPtr);
NEXT_INST_F(1, 0, 1);
@@ -7000,7 +7000,7 @@ TEBCresume(
}
{
ForeachInfo *infoPtr;
- Tcl_Obj *listPtr, **elements, *tmpPtr;
+ Tcl_Obj *listPtr, **elements;
ForeachVarList *varListPtr;
int numLists, iterMax, listLen, numVars;
int iterTmp, iterNum, listTmpDepth;
@@ -7286,8 +7286,8 @@ TEBCresume(
case INST_DICT_GET:
case INST_DICT_EXISTS: {
- register Tcl_Interp *interp2 = interp;
- register int found;
+ Tcl_Interp *interp2 = interp;
+ int found;
opnd = TclGetUInt4AtPtr(pc+1);
TRACE(("%u => ", opnd));
@@ -9599,7 +9599,7 @@ TclCompareTwoNumbers(
static void
PrintByteCodeInfo(
- register ByteCode *codePtr) /* The bytecode whose summary is printed to
+ ByteCode *codePtr) /* The bytecode whose summary is printed to
* stdout. */
{
Proc *procPtr = codePtr->procPtr;
@@ -9663,7 +9663,7 @@ PrintByteCodeInfo(
#ifdef TCL_COMPILE_DEBUG
static void
ValidatePcAndStackTop(
- register ByteCode *codePtr, /* The bytecode whose summary is printed to
+ ByteCode *codePtr, /* The bytecode whose summary is printed to
* stdout. */
const unsigned char *pc, /* Points to first byte of a bytecode
* instruction. The program counter. */
@@ -9906,7 +9906,7 @@ GetSrcInfoForPc(
* of the command containing the pc should
* be stored. */
{
- register int pcOffset = (pc - codePtr->codeStart);
+ int pcOffset = (pc - codePtr->codeStart);
int numCmds = codePtr->numCommands;
unsigned char *codeDeltaNext, *codeLengthNext;
unsigned char *srcDeltaNext, *srcLengthNext;
@@ -10059,9 +10059,9 @@ GetExceptRangeForPc(
{
ExceptionRange *rangeArrayPtr;
int numRanges = codePtr->numExceptRanges;
- register ExceptionRange *rangePtr;
+ ExceptionRange *rangePtr;
int pcOffset = pc - codePtr->codeStart;
- register int start;
+ int start;
if (numRanges == 0) {
return NULL;
@@ -10193,11 +10193,11 @@ TclExprFloatError(
int
TclLog2(
- register int value) /* The integer for which to compute the log
+ int value) /* The integer for which to compute the log
* base 2. */
{
- register int n = value;
- register int result = 0;
+ int n = value;
+ int result = 0;
while (n > 1) {
n = n >> 1;