Index: generic/nsf.c =================================================================== diff -u -rdbd95b0155c23213b81125e318b0691cb75f66f5 -r658c5ca127345b3f4377e551d5e9517c6481b473 --- generic/nsf.c (.../nsf.c) (revision dbd95b0155c23213b81125e318b0691cb75f66f5) +++ generic/nsf.c (.../nsf.c) (revision 658c5ca127345b3f4377e551d5e9517c6481b473) @@ -749,10 +749,12 @@ static void ParseContextRelease(ParseContext *pcPtr) { - int status = pcPtr->status; + int status; assert(pcPtr != NULL); + status = pcPtr->status; + /*fprintf(stderr, "ParseContextRelease %p status %.6x %d elements\n", pcPtr, status, pcPtr->objc);*/ @@ -7924,13 +7926,14 @@ static int AppendMatchingElementsFromClasses(Tcl_Interp *interp, NsfClasses *cls, const char *pattern, NsfObject *matchObject) { - int rc = 0; - Tcl_Obj *resultObj = Tcl_GetObjResult(interp); + Tcl_Obj *resultObj; assert(interp != NULL); - for ( ; cls; cls = cls->nextPtr) { + resultObj = Tcl_GetObjResult(interp); + for ( ; cls != NULL; cls = cls->nextPtr) { NsfObject *object = (NsfObject *)cls->cl; + if (object != NULL) { if (matchObject && object == matchObject) { /* @@ -7943,7 +7946,7 @@ } } } - return rc; + return 0; } /* @@ -22124,9 +22127,9 @@ Tcl_ListObjAppendElement(interp, listObj, object->cmdName); if (withProtection != 0) { Tcl_ListObjAppendElement(interp, listObj, - Tcl_Command_flags(cmd) & NSF_CMD_CALL_PRIVATE_METHOD + ((Tcl_Command_flags(cmd) & NSF_CMD_CALL_PRIVATE_METHOD) != 0) ? Tcl_NewStringObj("private", 7) - : Tcl_Command_flags(cmd) & NSF_CMD_CALL_PROTECTED_METHOD + : ((Tcl_Command_flags(cmd) & NSF_CMD_CALL_PROTECTED_METHOD) != 0) ? Tcl_NewStringObj("protected", 9) : Tcl_NewStringObj("public", 6)); } @@ -23285,7 +23288,9 @@ if (withClosure != 0) { NsfClasses *pl = PrecedenceOrder(cl); - if (pl != NULL) pl = pl->nextPtr; + if (pl != NULL) { + pl = pl->nextPtr; + } rc = AppendMatchingElementsFromClasses(interp, pl, patternString, matchObject); } else { NsfClasses *clSuper = NsfReverseClasses(cl->super); @@ -29123,7 +29128,7 @@ assert(object != NULL); /* append method keys from inheritance order */ - for (; classListPtr; classListPtr = classListPtr->nextPtr) { + for (; classListPtr != NULL; classListPtr = classListPtr->nextPtr) { Tcl_HashTable *cmdTablePtr = Tcl_Namespace_cmdTablePtr(classListPtr->cl->nsPtr); if (!MethodSourceMatches(withSource, classListPtr->cl, NULL)) { Index: generic/nsfDebug.c =================================================================== diff -u -r24571ae44c492c681d3efd2f2d2f5169ad7d6d57 -r658c5ca127345b3f4377e551d5e9517c6481b473 --- generic/nsfDebug.c (.../nsfDebug.c) (revision 24571ae44c492c681d3efd2f2d2f5169ad7d6d57) +++ generic/nsfDebug.c (.../nsfDebug.c) (revision 658c5ca127345b3f4377e551d5e9517c6481b473) @@ -116,15 +116,19 @@ void NsfStackDump(Tcl_Interp *interp) { - Interp *iPtr = (Interp *)interp; - CallFrame *f = iPtr->framePtr, *v = iPtr->varFramePtr; - Tcl_Obj *varCmdObj; + Interp *iPtr = (Interp *)interp; + CallFrame *f, *v; + Tcl_Obj *varCmdObj; assert(interp != NULL); + f = iPtr->framePtr; + v = iPtr->varFramePtr; varCmdObj = Tcl_NewObj(); fprintf (stderr, " TCL STACK:\n"); - if (f == 0) fprintf(stderr, "- "); + if (f == 0) { + fprintf(stderr, "- "); + } while (f) { Tcl_Obj *cmdObj = Tcl_NewObj(); fprintf(stderr, "\tFrame=%p ", f); Index: generic/nsfObj.c =================================================================== diff -u -rdbd95b0155c23213b81125e318b0691cb75f66f5 -r658c5ca127345b3f4377e551d5e9517c6481b473 --- generic/nsfObj.c (.../nsfObj.c) (revision dbd95b0155c23213b81125e318b0691cb75f66f5) +++ generic/nsfObj.c (.../nsfObj.c) (revision 658c5ca127345b3f4377e551d5e9517c6481b473) @@ -655,12 +655,14 @@ FilterregDupInternalRep( Tcl_Obj *srcObjPtr, Tcl_Obj *dstObjPtr) { - register Filterreg *srcPtr = (Filterreg *)srcObjPtr->internalRep.twoPtrValue.ptr1, *dstPtr; + register Filterreg *srcPtr, *dstPtr; assert(srcObjPtr != NULL); assert(dstObjPtr != NULL); - assert(srcPtr != NULL); + srcPtr = (Filterreg *)srcObjPtr->internalRep.twoPtrValue.ptr1; + assert(srcPtr != NULL); + #if defined(METHOD_OBJECT_TRACE) fprintf(stderr, "FilterregDupInternalRep src %p dst %p\n", srcObjPtr, dstObjPtr); #endif