Jim_InitHashTable(cmdPtr->staticVars, getJimVariablesHashTableType(),
interp);
for (i = 0; i < len; i++) {
- Jim_Obj *objPtr, *initObjPtr, *nameObjPtr;
+ Jim_Obj *objPtr=NULL, *initObjPtr=NULL, *nameObjPtr=NULL;
Jim_Var *varPtr;
int subLen;
int scanned = 1;
const char *str = Jim_GetString(strObjPtr, 0);
Jim_Obj *resultList = 0;
- Jim_Obj **resultVec;
+ Jim_Obj **resultVec =NULL;
int resultc;
Jim_Obj *emptyStr = 0;
ScanFmtStringObj *fmtObj;
}
for (i = 0; i < num_args; i++) {
- Jim_Obj *argObjPtr;
- Jim_Obj *nameObjPtr;
- Jim_Obj *valueObjPtr;
+ Jim_Obj *argObjPtr=NULL;
+ Jim_Obj *nameObjPtr=NULL;
+ Jim_Obj *valueObjPtr=NULL;
Jim_ListIndex(interp, cmd->argListObjPtr, i, &argObjPtr, JIM_NONE);
if (i + 1 >= cmd->arityMin) {
}
/* Set optional arguments */
if (cmd->arityMax == -1) {
- Jim_Obj *listObjPtr, *objPtr;
+ Jim_Obj *listObjPtr=NULL, *objPtr=NULL;
i++;
listObjPtr = Jim_NewListObj(interp, argv + i, argc-i);
Jim_HashEntry *he;
Jim_Obj *listObjPtr = Jim_NewListObj(interp, NULL, 0);
const char *pattern;
- int patternLen;
+ int patternLen=0;
pattern = patternObjPtr ? Jim_GetString(patternObjPtr, &patternLen) : NULL;
htiter = Jim_GetHashTableIterator(&interp->commands);
Jim_HashEntry *he;
Jim_Obj *listObjPtr = Jim_NewListObj(interp, NULL, 0);
const char *pattern;
- int patternLen;
+ int patternLen=0;
pattern = patternObjPtr ? Jim_GetString(patternObjPtr, &patternLen) : NULL;
if (mode == JIM_VARLIST_GLOBALS) {
exprLen = expr->len;
if (exprLen == 1) {
- jim_wide wideValue;
+ jim_wide wideValue=0;
if (expr->opcode[0] == JIM_EXPROP_VARIABLE) {
varAObjPtr = expr->obj[0];
if (varAObjPtr)
Jim_DecrRefCount(interp, varAObjPtr);
} else if (exprLen == 3) {
- jim_wide wideValueA, wideValueB, cmpRes = 0;
+ jim_wide wideValueA, wideValueB=0, cmpRes = 0;
int cmpType = expr->opcode[2];
varAObjPtr = expr->obj[0];
{
ScriptObj *initScript, *incrScript;
ExprByteCode *expr;
- jim_wide start, stop, currentVal;
+ jim_wide start, stop=0, currentVal;
unsigned jim_wide procEpoch = interp->procEpoch;
Jim_Obj *varNamePtr, *stopVarNamePtr = NULL, *objPtr;
int cmpType;
if (argListLen) {
const char *str;
int len;
- Jim_Obj *argPtr;
+ Jim_Obj *argPtr=NULL;
/* Check for 'args' and adjust arityMin and arityMax if necessary */
Jim_ListIndex(interp, argv[2], argListLen-1, &argPtr, JIM_NONE);
value = Jim_Alloc(sizeof(Jim_Obj*)*numMaps);
resultObjPtr = Jim_NewStringObj(interp, "", 0);
for (i = 0; i < numMaps; i++) {
- Jim_Obj *eleObjPtr;
+ Jim_Obj *eleObjPtr=NULL;
Jim_ListIndex(interp, mapListObjPtr, i*2, &eleObjPtr, JIM_NONE);
key[i] = Jim_GetString(eleObjPtr, &keyLen[i]);
resObjPtr = Jim_NewStringObj(interp, NULL, 0);
/* Split */
for (i = 0; i < listLen; i++) {
- Jim_Obj *objPtr;
+ Jim_Obj *objPtr=NULL;
Jim_ListIndex(interp, argv[1], i, &objPtr, JIM_NONE);
Jim_AppendObj(interp, resObjPtr, objPtr);
static int Jim_RandCoreCommand(Jim_Interp *interp, int argc,
Jim_Obj *const *argv)
{
- jim_wide min = 0, max, len, maxMul;
+ jim_wide min = 0, max =0, len, maxMul;
if (argc < 1 || argc > 3) {
Jim_WrongNumArgs(interp, 1, argv, "?min? max");
Jim_GetString(interp->result, NULL));
Jim_ListLength(interp, interp->stackTrace, &len);
for (i = len-3; i >= 0; i-= 3) {
- Jim_Obj *objPtr;
+ Jim_Obj *objPtr=NULL;
const char *proc, *file, *line;
Jim_ListIndex(interp, interp->stackTrace, i, &objPtr, JIM_NONE);