f0599475e8c7f919772d78cf04f7f980ffc4f9db larrym Wed Apr 18 07:55:50 2012 -0700 fix a warning diff --git src/hg/lib/jsHelper.c src/hg/lib/jsHelper.c index dcf2124..5dc89f1 100644 --- src/hg/lib/jsHelper.c +++ src/hg/lib/jsHelper.c @@ -817,31 +817,31 @@ static struct jsonElement *jsonParseString(char *str, int *posPtr) { int i; getSpecificChar('"', str, posPtr); for(i = 0; str[*posPtr + i] && str[*posPtr + i] != '"'; i++) ; char *val = cloneStringZ(str + *posPtr, i); *posPtr += i; getSpecificChar('"', str, posPtr); return (struct jsonElement *) newJsonString(val); } static struct jsonElement *jsonParseBoolean(char *str, int *posPtr) { -struct jsonBooleanElement *ele; +struct jsonBooleanElement *ele = NULL; int i; for(i = 0; str[*posPtr + i] && isalpha(str[*posPtr + i]); i++); ; char *val = cloneStringZ(str + *posPtr, i); if(sameWord(val, "true")) ele = newJsonBoolean(TRUE); else if(sameWord(val, "false")) ele = newJsonBoolean(FALSE); else errAbort("Invalid boolean value '%s'; pos: %d", val, *posPtr); *posPtr += i; return (struct jsonElement *) ele; } static struct jsonElement *jsonParseNumber(char *str, int *posPtr)