Fossil SCM

Fix non-C89 compliant variable declaration.

mistachkin 2011-11-05 00:05 jimtcl
Commit d0233e1792297d961e54efdb55b31df3a8afb443
1 file changed +2 -1
+2 -1
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -435,12 +435,13 @@
435435
void *pContext
436436
){
437437
int i;
438438
/* Add the Tcl integration commands to Jim. */
439439
for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){
440
+ void *ctx;
440441
if ( !aCommand[i].zName || !aCommand[i].xProc ) continue;
441
- void *ctx = aCommand[i].pContext;
442
+ ctx = aCommand[i].pContext;
442443
/* Use Tcl interpreter for context? */
443444
if( !ctx ) ctx = pContext;
444445
Jim_CreateCommand(interp, aCommand[i].zName, aCommand[i].xProc, ctx, NULL);
445446
}
446447
return JIM_OK;
447448
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -435,12 +435,13 @@
435 void *pContext
436 ){
437 int i;
438 /* Add the Tcl integration commands to Jim. */
439 for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){
 
440 if ( !aCommand[i].zName || !aCommand[i].xProc ) continue;
441 void *ctx = aCommand[i].pContext;
442 /* Use Tcl interpreter for context? */
443 if( !ctx ) ctx = pContext;
444 Jim_CreateCommand(interp, aCommand[i].zName, aCommand[i].xProc, ctx, NULL);
445 }
446 return JIM_OK;
447
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -435,12 +435,13 @@
435 void *pContext
436 ){
437 int i;
438 /* Add the Tcl integration commands to Jim. */
439 for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){
440 void *ctx;
441 if ( !aCommand[i].zName || !aCommand[i].xProc ) continue;
442 ctx = aCommand[i].pContext;
443 /* Use Tcl interpreter for context? */
444 if( !ctx ) ctx = pContext;
445 Jim_CreateCommand(interp, aCommand[i].zName, aCommand[i].xProc, ctx, NULL);
446 }
447 return JIM_OK;
448

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button