diff --git a/cde/programs/dtmail/MotifApp/MenuBar.C b/cde/programs/dtmail/MotifApp/MenuBar.C index c7cd0d139..9dc377fe9 100644 --- a/cde/programs/dtmail/MotifApp/MenuBar.C +++ b/cde/programs/dtmail/MotifApp/MenuBar.C @@ -703,7 +703,7 @@ MenuBar::rotateLabels( XtArgVal num_children; WidgetList children; XmString label, endlabel; - Widget prevwid, wid; + Widget prevwid = NULL, wid; if (startindex < 0 || endindex < 0) return; @@ -763,9 +763,11 @@ MenuBar::rotateLabels( prevwid = (Widget) children[j]; } while (!XtIsManaged(prevwid)); - XtVaGetValues(prevwid, - XmNlabelString, &label, - NULL); + if(prevwid) { + XtVaGetValues(prevwid, + XmNlabelString, &label, + NULL); + } XtVaSetValues(wid, XmNlabelString, label, diff --git a/cde/programs/dtmail/dtmail/RoamCmds.C b/cde/programs/dtmail/dtmail/RoamCmds.C index 1dc98940b..bf1ae94d8 100644 --- a/cde/programs/dtmail/dtmail/RoamCmds.C +++ b/cde/programs/dtmail/dtmail/RoamCmds.C @@ -2549,7 +2549,7 @@ SaveAsTextCmd::writeText(XtPointer filedes, char *text_buf) void SaveAsTextCmd::doit() { - MsgScrollingList *list; + MsgScrollingList *list = NULL; Widget listW; int *pos_list = NULL; int pos_count = 0; diff --git a/cde/programs/dtmail/dtmail/dtb_utils.C b/cde/programs/dtmail/dtmail/dtb_utils.C index 951f8722d..9a0f96b40 100644 --- a/cde/programs/dtmail/dtmail/dtb_utils.C +++ b/cde/programs/dtmail/dtmail/dtb_utils.C @@ -904,6 +904,9 @@ dtb_more_help_dispatch( *cp++ = 0; vol = buffer; loc = cp; + } else { + /* No / in help string, invalid */ + return; } if(GeneralHelpDialog == (Widget)NULL) { @@ -2489,7 +2492,7 @@ align_labels( ) { WidgetList children_list = NULL, - one_col; + one_col = NULL; Widget previous_child = NULL, child, previous_ref_widget = NULL; diff --git a/cde/programs/dtmail/libDtMail/Common/DtMailError.C b/cde/programs/dtmail/libDtMail/Common/DtMailError.C index 3e2e9f420..6ff659800 100644 --- a/cde/programs/dtmail/libDtMail/Common/DtMailError.C +++ b/cde/programs/dtmail/libDtMail/Common/DtMailError.C @@ -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)) { diff --git a/cde/programs/dtmail/libDtMail/RFC/MIMEPartial.C b/cde/programs/dtmail/libDtMail/RFC/MIMEPartial.C index 243b52677..fe0f08359 100644 --- a/cde/programs/dtmail/libDtMail/RFC/MIMEPartial.C +++ b/cde/programs/dtmail/libDtMail/RFC/MIMEPartial.C @@ -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; diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCBodyPart.C b/cde/programs/dtmail/libDtMail/RFC/RFCBodyPart.C index 6fa98bdfc..4b608354f 100644 --- a/cde/programs/dtmail/libDtMail/RFC/RFCBodyPart.C +++ b/cde/programs/dtmail/libDtMail/RFC/RFCBodyPart.C @@ -420,6 +420,7 @@ RFCBodyPart::flagIsSet(DtMailEnv & error, default: error.setError(DTME_OperationInvalid); + return(DTM_FALSE); } return(answer); diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCMailValues.C b/cde/programs/dtmail/libDtMail/RFC/RFCMailValues.C index 5c4681da7..d947cb5aa 100644 --- a/cde/programs/dtmail/libDtMail/RFC/RFCMailValues.C +++ b/cde/programs/dtmail/libDtMail/RFC/RFCMailValues.C @@ -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]--; }