conf: cleanup compiler warning (unintialized vars)

pull/2364/head
Jason Ish 9 years ago committed by Victor Julien
parent 1a724ba851
commit dcdf160ab2

@ -379,7 +379,7 @@ int ConfGetChildValueWithDefault(const ConfNode *base, const ConfNode *dflt,
*/ */
int ConfGetInt(const char *name, intmax_t *val) int ConfGetInt(const char *name, intmax_t *val)
{ {
char *strval; char *strval = NULL;
intmax_t tmpint; intmax_t tmpint;
char *endptr; char *endptr;
@ -399,7 +399,7 @@ int ConfGetInt(const char *name, intmax_t *val)
int ConfGetChildValueInt(const ConfNode *base, const char *name, intmax_t *val) int ConfGetChildValueInt(const ConfNode *base, const char *name, intmax_t *val)
{ {
char *strval; char *strval = NULL;
intmax_t tmpint; intmax_t tmpint;
char *endptr; char *endptr;
@ -441,7 +441,7 @@ int ConfGetChildValueIntWithDefault(const ConfNode *base, const ConfNode *dflt,
*/ */
int ConfGetBool(const char *name, int *val) int ConfGetBool(const char *name, int *val)
{ {
char *strval; char *strval = NULL;
*val = 0; *val = 0;
if (ConfGet(name, &strval) != 1) if (ConfGet(name, &strval) != 1)
@ -454,7 +454,7 @@ int ConfGetBool(const char *name, int *val)
int ConfGetChildValueBool(const ConfNode *base, const char *name, int *val) int ConfGetChildValueBool(const ConfNode *base, const char *name, int *val)
{ {
char *strval; char *strval = NULL;
*val = 0; *val = 0;
if (ConfGetChildValue(base, name, &strval) == 0) if (ConfGetChildValue(base, name, &strval) == 0)
@ -539,7 +539,7 @@ int ConfValIsFalse(const char *val)
*/ */
int ConfGetDouble(const char *name, double *val) int ConfGetDouble(const char *name, double *val)
{ {
char *strval; char *strval = NULL;
double tmpdo; double tmpdo;
char *endptr; char *endptr;
@ -569,7 +569,7 @@ int ConfGetDouble(const char *name, double *val)
*/ */
int ConfGetFloat(const char *name, float *val) int ConfGetFloat(const char *name, float *val)
{ {
char *strval; char *strval = NULL;
double tmpfl; double tmpfl;
char *endptr; char *endptr;

Loading…
Cancel
Save