Index: generic/nsf.c =================================================================== diff -u -r869a425be1ccd173b0adb88d916232247073dd4b -r0948fdce861ff4566dbbad39927db6ace05f1970 --- generic/nsf.c (.../nsf.c) (revision 869a425be1ccd173b0adb88d916232247073dd4b) +++ generic/nsf.c (.../nsf.c) (revision 0948fdce861ff4566dbbad39927db6ace05f1970) @@ -6770,7 +6770,6 @@ Namespace *nsPtr, *dummy1Ptr, *dummy2Ptr, *parentNsPtr = (Namespace *)parentNsPtr1; const char *parentName, *dummy; Tcl_DString ds, *dsPtr = &ds; - int parentNameLength; nonnull_assert(interp != NULL); nonnull_assert(nameString != NULL); @@ -6804,14 +6803,14 @@ } if (parentNsPtr != NULL) { - parentNameLength = 0; parentName = parentNsPtr->fullName; if (*(parentName + 2) == '\0') { parentName = NULL; } /*fprintf(stderr, "NSCheckNamespace parentNs %s parentName of '%s' => '%s'\n", parentNsPtr->fullName, nameString, parentName);*/ } else { + int parentNameLength; const char *n = nameString + strlen(nameString); /* * search for last '::' @@ -10892,14 +10891,18 @@ result = NsfFilterregGet(interp, filterregObj, &filterObj, &guardObj); if (result == TCL_OK) { - if (!(cmd = FilterSearch(ObjStr(filterObj), startingObject, startingClass, &class))) { + const char *filterName = ObjStr(filterObj); + + cmd = FilterSearch(filterName, startingObject, startingClass, &class); + if (cmd == NULL) { if (startingObject != NULL) { result = NsfPrintError(interp, "object filter: can't find filterproc '%s' on %s ", - ObjStr(filterObj), ObjectName(startingObject)); + filterName, ObjectName(startingObject)); } else { result = NsfPrintError(interp, "class filter: can't find filterproc '%s' on %s ", - ObjStr(filterObj), ClassName(startingClass)); + filterName, ClassName(startingClass)); } + assert(result == TCL_ERROR); } } } @@ -26668,7 +26671,7 @@ snprintf(buffer + i*2, 24, "%.2x", (unsigned)(*((obj->bytes)+i) & 0xff)); } if (obj->length > 10) { - strcat(buffer, "..."); + strncat(buffer, "...", 3u); } Tcl_ListObjAppendElement(interp, resultObj, Tcl_NewStringObj(buffer, -1)); @@ -30410,9 +30413,9 @@ * GetObjectParameterDefinition -- * * Obtain the parameter definitions for an object by calling the method - * "__objectparameter" if the value is not cached already. Caching is - * performed on the class, the cached values are used in case there are no - * object-specific slots. + * "__objectparameter" if the value is not cached already. Either "object" + * or "class" must be non-null. Caching is performed on the class, the + * cached values are used in case there are no object-specific slots. * * Results: * Tcl return code, parsed structure in last argument Index: generic/nsfCmdPtr.c =================================================================== diff -u -rb655363cc8f029178075f75e3376c20d7b79c806 -r0948fdce861ff4566dbbad39927db6ace05f1970 --- generic/nsfCmdPtr.c (.../nsfCmdPtr.c) (revision b655363cc8f029178075f75e3376c20d7b79c806) +++ generic/nsfCmdPtr.c (.../nsfCmdPtr.c) (revision 0948fdce861ff4566dbbad39927db6ace05f1970) @@ -32,9 +32,11 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -/* +/* + * nsfInt is just needed for NSF_INLINE */ +#include static NSF_INLINE NsfObject* NsfGetObjectFromCmdPtr(const Tcl_Command cmd) nonnull(1); static NSF_INLINE ClientData NsfGetClientDataFromCmdPtr(const Tcl_Command cmd) nonnull(1);