diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-08-16 13:55:06 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-08-16 13:55:06 (GMT) |
commit | 2b06c7f54bcd83f0b688de71e23b603a2586974c (patch) | |
tree | dfac520f6bcb71143cd81124598bdb9d07e00d0b /generic/tclCmdIL.c | |
parent | 268e10049df3ec1784fdaae40b0644ce5f482653 (diff) | |
download | tcl-2b06c7f54bcd83f0b688de71e23b603a2586974c.zip tcl-2b06c7f54bcd83f0b688de71e23b603a2586974c.tar.gz tcl-2b06c7f54bcd83f0b688de71e23b603a2586974c.tar.bz2 |
Small changes to quell gcc warnings and make message generation less ugly.
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r-- | generic/tclCmdIL.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 64348ad..95532d3 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -4446,12 +4446,9 @@ SelectObjFromSublist( return NULL; } if (currentObj == NULL) { - char buffer[TCL_INTEGER_SPACE]; - - TclFormatInt(buffer, index); - Tcl_AppendResult(infoPtr->interp, "element ", buffer, - " missing from sublist \"", TclGetString(objPtr), "\"", - NULL); + Tcl_SetObjResult(infoPtr->interp, Tcl_ObjPrintf( + "element %d missing from sublist \"%s\"", + index, TclGetString(objPtr))); Tcl_SetErrorCode(infoPtr->interp, "TCL", "OPERATION", "LSORT", "INDEXFAILED", NULL); infoPtr->resultCode = TCL_ERROR; |