dtmail: Resolve uninitialized warnings
This commit is contained in:
committed by
Jon Trulson
parent
85268b3476
commit
72b59ec869
@@ -404,7 +404,7 @@ char *
|
||||
DtMailEnv::getMessageText(int set, int msg, char *dft)
|
||||
{
|
||||
static int oneTimeFlag = 0; // Only attempt to open message catalog once
|
||||
char *message;
|
||||
char *message = NULL;
|
||||
|
||||
if ((oneTimeFlag == 0) && (_errorCatalog == (nl_catd) -1))
|
||||
{
|
||||
|
||||
@@ -108,7 +108,7 @@ getNamedValueString(const char *string, const char *name)
|
||||
{
|
||||
int stringLen = strlen(string);
|
||||
int nameLen = strlen(name);
|
||||
const char * results;
|
||||
const char * results = NULL;
|
||||
char * stringEnd;
|
||||
unsigned int offset;
|
||||
|
||||
|
||||
@@ -420,6 +420,7 @@ RFCBodyPart::flagIsSet(DtMailEnv & error,
|
||||
|
||||
default:
|
||||
error.setError(DTME_OperationInvalid);
|
||||
return(DTM_FALSE);
|
||||
}
|
||||
|
||||
return(answer);
|
||||
|
||||
@@ -381,6 +381,8 @@ RFCValue::toDate(void)
|
||||
const char *token_end[12];
|
||||
int n_tokens = 0;
|
||||
|
||||
token_end[0] = NULL;
|
||||
|
||||
// Look for the end of each token. Date tokens are white space
|
||||
// separated.
|
||||
while (*pos) {
|
||||
@@ -407,7 +409,7 @@ RFCValue::toDate(void)
|
||||
// Some dates will have a comma after the day of the week. We
|
||||
// want to remove that. It will always be the first token if
|
||||
// we have the day of the week.
|
||||
if (*token_end[0] == ',') {
|
||||
if (token_end[0] && *token_end[0] == ',') {
|
||||
token_end[0]--;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user