diff --git a/libs/xmlrpc-c/src/method.c b/libs/xmlrpc-c/src/method.c index a325f1c960..cf58b260fe 100644 --- a/libs/xmlrpc-c/src/method.c +++ b/libs/xmlrpc-c/src/method.c @@ -210,7 +210,7 @@ listSignatures(xmlrpc_env * const envP, cursorP = &sigListString[0]; while (!envP->fault_occurred && *cursorP != '\0') { - struct xmlrpc_signature * signatureP; + struct xmlrpc_signature * signatureP = NULL; parseOneSignature(envP, cursorP, &signatureP, &cursorP); diff --git a/libs/xmlrpc-c/src/parse_value.c b/libs/xmlrpc-c/src/parse_value.c index 3f52cb9d29..a00b2a1779 100644 --- a/libs/xmlrpc-c/src/parse_value.c +++ b/libs/xmlrpc-c/src/parse_value.c @@ -188,7 +188,7 @@ parseMember(xmlrpc_env * const envP, " element has %u children. Only one and " "one make sense.", childCount); else { - xml_element * nameElemP; + xml_element * nameElemP = NULL; getNameChild(envP, memberP, &nameElemP); @@ -196,7 +196,7 @@ parseMember(xmlrpc_env * const envP, parseName(envP, nameElemP, keyPP); if (!envP->fault_occurred) { - xml_element * valueElemP; + xml_element * valueElemP = NULL; getValueChild(envP, memberP, &valueElemP); @@ -242,7 +242,7 @@ parseStruct(xmlrpc_env * const envP, setParseFault(envP, "<%s> element found where only " "makes sense", elemName); else { - xmlrpc_value * keyP; + xmlrpc_value * keyP = NULL; xmlrpc_value * valueP; parseMember(envP, members[i], maxRecursion, &keyP, &valueP); @@ -414,10 +414,10 @@ parseDoubleString(xmlrpc_env * const envP, Design note: in my experiments, using strtod() was 10 times slower than using this function. */ - const char * mantissa; - const char * mantissaEnd; - const char * fraction; - const char * fractionEnd; + const char * mantissa = NULL; + const char * mantissaEnd = NULL; + const char * fraction = NULL; + const char * fractionEnd = NULL; scanAndValidateDoubleString(envP, string, &mantissa, &mantissaEnd, &fraction, &fractionEnd); @@ -500,7 +500,7 @@ parseDouble(xmlrpc_env * const envP, 'str' is that content. -----------------------------------------------------------------------------*/ xmlrpc_env parseEnv; - double valueDouble; + double valueDouble = 0; XMLRPC_ASSERT_ENV_OK(envP); XMLRPC_ASSERT_PTR_OK(str); diff --git a/libs/xmlrpc-c/src/system_method.c b/libs/xmlrpc-c/src/system_method.c index e582b5c5c2..e1f77c0c83 100644 --- a/libs/xmlrpc-c/src/system_method.c +++ b/libs/xmlrpc-c/src/system_method.c @@ -452,7 +452,7 @@ getSignatureList(xmlrpc_env * const envP, signatureP && !envP->fault_occurred; signatureP = signatureP->nextP) { - xmlrpc_value * signatureVP; + xmlrpc_value * signatureVP = NULL; buildSignatureValue(envP, signatureP, &signatureVP); diff --git a/libs/xmlrpc-c/src/xmlrpc_server_abyss.c b/libs/xmlrpc-c/src/xmlrpc_server_abyss.c index 0972b0bd51..13c70e358b 100644 --- a/libs/xmlrpc-c/src/xmlrpc_server_abyss.c +++ b/libs/xmlrpc-c/src/xmlrpc_server_abyss.c @@ -471,7 +471,7 @@ processCall(TSession * const abyssSessionP, &env, XMLRPC_LIMIT_EXCEEDED_ERROR, "XML-RPC request too large (%d bytes)", contentSize); else { - xmlrpc_mem_block * body; + xmlrpc_mem_block * body = NULL; /* Read XML data off the wire. */ getBody(&env, abyssSessionP, contentSize, trace, &body); if (!env.fault_occurred) { @@ -890,8 +890,8 @@ createServerBare(xmlrpc_env * const envP, to use. -----------------------------------------------------------------------------*/ bool socketBound; - unsigned int portNumber; - TOsSocket socketFd; + unsigned int portNumber = 0; + TOsSocket socketFd = NULL; const char * logFileName; extractServerCreateParms(envP, parmsP, parmSize,