Index: generic/gentclAPI.tcl =================================================================== diff -u -r2321487af7f5d63ba7abb11d14e657a24b2e7788 -r8a19ff2ec04063dbc140fdd7f3b26745d5138a2f --- generic/gentclAPI.tcl (.../gentclAPI.tcl) (revision 2321487af7f5d63ba7abb11d14e657a24b2e7788) +++ generic/gentclAPI.tcl (.../gentclAPI.tcl) (revision 8a19ff2ec04063dbc140fdd7f3b26745d5138a2f) @@ -75,11 +75,11 @@ @globalOpts@ static int ConvertTo@name@(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; @localOpts@ (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, @optsName@, "@typeName@", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, @optsName@, "@typeName@", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } Index: generic/nsf.c =================================================================== diff -u -r156a37fe92eea9dcf0ec82cc6bf333293fcf2ecd -r8a19ff2ec04063dbc140fdd7f3b26745d5138a2f --- generic/nsf.c (.../nsf.c) (revision 156a37fe92eea9dcf0ec82cc6bf333293fcf2ecd) +++ generic/nsf.c (.../nsf.c) (revision 8a19ff2ec04063dbc140fdd7f3b26745d5138a2f) @@ -32614,7 +32614,7 @@ static int NsfCAllocMethod(Tcl_Interp *interp, NsfClass *class, Tcl_Obj *nameObj) { const char *nameString; - int result, nameLength; + int result, nameLength = 0; /* * Create a new object from scratch. @@ -32672,7 +32672,7 @@ NsfCCreateMethod(Tcl_Interp *interp, NsfClass *class, Tcl_Obj *nameObj, int objc, Tcl_Obj *const objv[]) { NsfObject *newObject = NULL; Tcl_Obj *actualNameObj, *methodObj, *tmpObj = NULL; - int result, nameLength; + int result, nameLength = 0; bool autoNameCreate; const char *nameString; Tcl_Namespace *parentNsPtr; Index: generic/nsfAPI.h =================================================================== diff -u -r1279a7ecae38bb092922db436da36d0caa77cf6f -r8a19ff2ec04063dbc140fdd7f3b26745d5138a2f --- generic/nsfAPI.h (.../nsfAPI.h) (revision 1279a7ecae38bb092922db436da36d0caa77cf6f) +++ generic/nsfAPI.h (.../nsfAPI.h) (revision 8a19ff2ec04063dbc140fdd7f3b26745d5138a2f) @@ -68,11 +68,11 @@ static int ConvertToInfomethodsubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; static const char *opts[] = {"args", "body", "definition", "exists", "registrationhandle", "definitionhandle", "origin", "parameter", "syntax", "type", "precondition", "postcondition", "submethods", "returns", "disassemble", NULL}; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, opts, "infomethodsubcmd", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "infomethodsubcmd", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } @@ -81,11 +81,11 @@ static int ConvertToCallprotection(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; static const char *opts[] = {"all", "public", "protected", "private", NULL}; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, opts, "callprotection", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "callprotection", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } @@ -94,11 +94,11 @@ static int ConvertToMethodtype(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; static const char *opts[] = {"all", "scripted", "builtin", "alias", "forwarder", "object", "setter", "nsfproc", NULL}; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, opts, "methodtype", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "methodtype", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } @@ -107,11 +107,11 @@ static int ConvertToDefinitionsource(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; static const char *opts[] = {"all", "application", "system", NULL}; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, opts, "definitionsource", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "definitionsource", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } @@ -120,11 +120,11 @@ static int ConvertToMixinscope(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; static const char *opts[] = {"all", "class", "object", NULL}; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, opts, "mixinscope", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "mixinscope", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } @@ -133,11 +133,11 @@ const char *Nsf_Configureoption[] = {"debug", "dtrace", "filter", "softrecreate", "objectsystems", "keepcmds", "checkresults", "checkarguments", NULL}; static int ConvertToConfigureoption(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, Nsf_Configureoption, "configureoption", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, Nsf_Configureoption, "configureoption", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } @@ -146,11 +146,11 @@ static int ConvertToCurrentoption(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; static const char *opts[] = {"activelevel", "activemixin", "args", "calledclass", "calledmethod", "calledproc", "callingclass", "callinglevel", "callingmethod", "callingobject", "callingproc", "class", "filterreg", "isnextcall", "level", "methodpath", "method", "nextmethod", "object", "proc", NULL}; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, opts, "currentoption", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "currentoption", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } @@ -159,11 +159,11 @@ static int ConvertToFrame(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; static const char *opts[] = {"method", "object", "default", NULL}; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, opts, "frame", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "frame", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } @@ -172,11 +172,11 @@ static int ConvertToForwardproperty(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; static const char *opts[] = {"prefix", "target", "verbose", NULL}; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, opts, "forwardProperty", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "forwardProperty", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } @@ -185,11 +185,11 @@ static int ConvertToProtection(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; static const char *opts[] = {"call-protected", "redefine-protected", "none", NULL}; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, opts, "protection", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "protection", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } @@ -198,11 +198,11 @@ static int ConvertToAssertionsubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; static const char *opts[] = {"check", "object-invar", "class-invar", NULL}; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, opts, "assertionsubcmd", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "assertionsubcmd", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } @@ -211,11 +211,11 @@ static int ConvertToMethodproperty(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; static const char *opts[] = {"class-only", "call-private", "call-protected", "debug", "deprecated", "exists", "redefine-protected", "returns", NULL}; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, opts, "methodProperty", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "methodProperty", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } @@ -224,11 +224,11 @@ static int ConvertToObjectproperty(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; static const char *opts[] = {"initialized", "class", "rootmetaclass", "rootclass", "volatile", "autonamed", "slotcontainer", "hasperobjectslots", "keepcallerself", "perobjectdispatch", NULL}; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, opts, "objectProperty", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "objectProperty", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } @@ -237,11 +237,11 @@ static int ConvertToParametersubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; static const char *opts[] = {"default", "list", "name", "syntax", "type", NULL}; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, opts, "parametersubcmd", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "parametersubcmd", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } @@ -250,11 +250,11 @@ static int ConvertToRelationtype(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; static const char *opts[] = {"object-mixin", "class-mixin", "object-filter", "class-filter", "class", "superclass", "rootclass", NULL}; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, opts, "relationtype", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "relationtype", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; } Index: library/mongodb/mongoAPI.h =================================================================== diff -u -r9d1dfb6417294dbdc13ce4d249931055f7bd5ef8 -r8a19ff2ec04063dbc140fdd7f3b26745d5138a2f --- library/mongodb/mongoAPI.h (.../mongoAPI.h) (revision 9d1dfb6417294dbdc13ce4d249931055f7bd5ef8) +++ library/mongodb/mongoAPI.h (.../mongoAPI.h) (revision 8a19ff2ec04063dbc140fdd7f3b26745d5138a2f) @@ -68,11 +68,11 @@ static int ConvertToGridfilesource(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param const *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - int index, result; + int pos, result; static const char *opts[] = {"file", "string", NULL}; (void)pPtr; - result = Tcl_GetIndexFromObj(interp, objPtr, opts, "gridfilesource", 0, &index); - *clientData = (ClientData) INT2PTR(index + 1); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "gridfilesource", 0, &pos); + *clientData = (ClientData) INT2PTR(pos + 1); *outObjPtr = objPtr; return result; }