Index: generic/nsf.c =================================================================== diff -u -N -r4e80fb687a82af0fc9ac0d109863931f4910de4a -r7b03a5476b57153b65a849aebe6924e16ab46aa0 --- generic/nsf.c (.../nsf.c) (revision 4e80fb687a82af0fc9ac0d109863931f4910de4a) +++ generic/nsf.c (.../nsf.c) (revision 7b03a5476b57153b65a849aebe6924e16ab46aa0) @@ -20765,6 +20765,13 @@ switch (level) { case CALLING_LEVEL: { Tcl_CallFrame *callingFramePtr = NULL; + + /* + * NsfCallStackFindCallingContext() sets always the framePtr, but + * initialize framePtr explicitly to silence static checkers, since + * ComputeLevelObj() is not performance critical. + */ + framePtr = NULL; NsfCallStackFindCallingContext(interp, 1, &framePtr, &callingFramePtr); if (framePtr == NULL) { framePtr = callingFramePtr; @@ -32449,15 +32456,22 @@ objv += result + 1; if (result == 0) { - /* 0 is returned from TclObjGetFrame when no (or, an invalid) level specifier was provided */ + /* + * 0 is returned from TclObjGetFrame when no (or, an invalid) level + * specifier was provided. + */ Tcl_CallFrame *callingFramePtr = NULL; NsfCallStackFindCallingContext(interp, 1, &framePtr, &callingFramePtr); if (framePtr == NULL) { - /* no proc frame was found, default to parent frame */ + /* + * No proc frame was found, default to parent frame. + */ framePtr = callingFramePtr; } } else { - /* use the requested frame corresponding to the (valid) level specifier */ + /* + * Use the requested frame corresponding to the (valid) level specifier. + */ framePtr = (Tcl_CallFrame *)requestedFramePtr; }