1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

dtcm: Resolve uninitialized warnings

This commit is contained in:
Peter Howkins 2021-12-22 01:26:51 +00:00 committed by Jon Trulson
parent 85684c337a
commit 2c134302c8
13 changed files with 24 additions and 19 deletions

View file

@ -575,7 +575,7 @@ find_appts(Widget widget, XtPointer client_data, XmPushButtonCallbackStruct *cbs
int num_items, mo, last_match_total = 0, match_total = 0; int num_items, mo, last_match_total = 0, match_total = 0;
pr_pos xy; pr_pos xy;
Tick end_of_time, start, stop; Tick end_of_time, start, stop;
Tick_list *ptr, *next_ptr, *tail_ptr, *new_tick; Tick_list *ptr, *next_ptr, *tail_ptr = NULL, *new_tick;
CSA_session_handle cal = 0; CSA_session_handle cal = 0;
CSA_return_code stat; CSA_return_code stat;
CSA_entry_handle *entries = NULL; CSA_entry_handle *entries = NULL;

View file

@ -60,7 +60,7 @@ get_font(
XmFontContext fl_context; XmFontContext fl_context;
XmFontListEntry fl_entry; XmFontListEntry fl_entry;
XtPointer fl_entry_font, XtPointer fl_entry_font,
font_to_use; font_to_use = NULL;
char *fl_entry_font_tag; char *fl_entry_font_tag;
Boolean found_font_set = False, Boolean found_font_set = False,
found_font_struct = False; found_font_struct = False;

View file

@ -682,7 +682,7 @@ dialog_popup(Widget parent, ...) {
char *text_str = NULL, *ptr, buf[MAXNAMELEN], *help_str; char *text_str = NULL, *ptr, buf[MAXNAMELEN], *help_str;
Pixmap px; Pixmap px;
va_list pvar; va_list pvar;
Widget frame, form, image, sep, text, last_text, button; Widget frame, form, image, sep, text, last_text = NULL, button;
Display *dpy = XtDisplayOfObject(parent); Display *dpy = XtDisplayOfObject(parent);
XmString xmstr; XmString xmstr;
Dialog_create_op op; Dialog_create_op op;
@ -1301,7 +1301,7 @@ Dimension *dim,
... ) ... )
{ {
va_list ap; va_list ap;
int i, _high; int i, _high = 0;
Dimension _max; Dimension _max;
Widget _targetW, _highestW; Widget _targetW, _highestW;
Arg _args[3]; Arg _args[3];
@ -1355,7 +1355,7 @@ Dimension *dim,
... ) ... )
{ {
va_list ap; va_list ap;
int i, _wide; int i, _wide = 0;
Widget _targetW, _widestW; Widget _targetW, _widestW;
Dimension _max; Dimension _max;
XtWidgetGeometry geo; XtWidgetGeometry geo;
@ -1425,7 +1425,7 @@ Dimension *dim,
... ) ... )
{ {
va_list ap; va_list ap;
int i, _high; int i, _high = 0;
Dimension _max; Dimension _max;
Widget _targetW, _highestW; Widget _targetW, _highestW;
Arg _args[3]; Arg _args[3];

View file

@ -2638,7 +2638,7 @@ extern Boolean
get_editor_vals_from_ui(Props_pu *pu, Props *p) { get_editor_vals_from_ui(Props_pu *pu, Props *p) {
int i, hr, min; int i, hr, min;
char buf[5]; char buf[5];
Widget text; Widget text = NULL;
DisplayType dt = get_int_prop(p, CP_DEFAULTDISP); DisplayType dt = get_int_prop(p, CP_DEFAULTDISP);
Reminders_val *val; Reminders_val *val;
char *msg, *dur_txt; char *msg, *dur_txt;
@ -2733,7 +2733,7 @@ get_editor_vals_from_ui(Props_pu *pu, Props *p) {
if ((status = get_reminders_vals(&pu->ep_reminders, False)) != REMINDERS_OK) { if ((status = get_reminders_vals(&pu->ep_reminders, False)) != REMINDERS_OK) {
char *title = XtNewString(CATGETS(c->DT_catd, 1, 1079, "Calendar : Error - Editor Settings")); char *title = XtNewString(CATGETS(c->DT_catd, 1, 1079, "Calendar : Error - Editor Settings"));
char *text; char *text = NULL;
char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue"));
switch (status) { switch (status) {

View file

@ -2128,8 +2128,10 @@ build_todo_list(ToDo *t, Tick date, Glance glance, CSA_entry_handle **a, CSA_uin
state = CSA_STATUS_COMPLETED; state = CSA_STATUS_COMPLETED;
use_state = B_TRUE; use_state = B_TRUE;
} }
else else {
state = 0;
use_state = B_FALSE; use_state = B_FALSE;
}
setup_range(&range_attrs, &ops, &range_count, start, stop, setup_range(&range_attrs, &ops, &range_count, start, stop,
CSA_TYPE_TODO, state, use_state, t->cal->general->version); CSA_TYPE_TODO, state, use_state, t->cal->general->version);

View file

@ -377,7 +377,7 @@ text_to_lines(char *s, int n)
Lines *prev_l = NULL, *l = NULL, *head= NULL; Lines *prev_l = NULL, *l = NULL, *head= NULL;
int i = 0; int i = 0;
char *_p; char *_p;
int clen; int clen = 0;
if (s == NULL || n <= 0) return NULL; if (s == NULL || n <= 0) return NULL;
@ -1227,7 +1227,7 @@ Dtcm_appointment *allocate_appt_struct (Allocation_reason reason, int version, .
va_list pvar; va_list pvar;
CmDataList *api_ids = CmDataListCreate(); CmDataList *api_ids = CmDataListCreate();
Dtcm_appointment *appt; Dtcm_appointment *appt;
int def_attr_count; int def_attr_count = 0;
/* /*
* The Dtcm_appointment wrapper array * The Dtcm_appointment wrapper array

View file

@ -778,7 +778,7 @@ cms_insert_entry_5_svc(cms_insert_args *args, struct svc_req *svcrq)
cms_key key; cms_key key;
char *user; char *user;
uint access, needaccess; uint access, needaccess;
Appt_4 *appt; Appt_4 *appt = NULL;
if (debug) if (debug)
fprintf(stderr, "cms_insert_entry_5_svc called\n"); fprintf(stderr, "cms_insert_entry_5_svc called\n");

View file

@ -341,10 +341,10 @@ _DtCmsGetEntryAttrByKey(
CSA_return_code stat; CSA_return_code stat;
CSA_return_code stat2; CSA_return_code stat2;
cms_entry *entry = NULL; cms_entry *entry = NULL;
char *stime, *etime; char *stime, *etime = NULL;
char sbuf[TIME_BUF_LEN], ebuf[TIME_BUF_LEN]; char sbuf[TIME_BUF_LEN], ebuf[TIME_BUF_LEN];
time_t firsttick = 0; time_t firsttick = 0;
List_node *lnode; List_node *lnode = NULL;
cms_get_entry_attr_res_item *res = NULL; cms_get_entry_attr_res_item *res = NULL;
if (entry_r == NULL && res_r == NULL) if (entry_r == NULL && res_r == NULL)
@ -529,7 +529,7 @@ _EnumerateSequence(
stat == CSA_SUCCESS && tick < start2; stat == CSA_SUCCESS && tick < start2;
tick = NextTick(tick, fsttick, lnode->re, restate)) tick = NextTick(tick, fsttick, lnode->re, restate))
{ {
char *stime, *etime; char *stime, *etime = NULL;
char sbuf[TIME_BUF_LEN], ebuf[TIME_BUF_LEN]; char sbuf[TIME_BUF_LEN], ebuf[TIME_BUF_LEN];
if (tick <= 0 || tick > lnode->lasttick) if (tick <= 0 || tick > lnode->lasttick)

View file

@ -77,7 +77,7 @@ ClosestTick(
RepeatEvent *re, RepeatEvent *re,
RepeatEventState **res) RepeatEventState **res)
{ {
Tick closest_tick, Tick closest_tick = 0,
real_start_time, real_start_time,
target_time = _target_time; target_time = _target_time;

View file

@ -61,7 +61,7 @@ LastTick(
const Tick start_time, const Tick start_time,
RepeatEvent *re) RepeatEvent *re)
{ {
Tick last_time; Tick last_time = 0;
if (!re) return (Tick)0; if (!re) return (Tick)0;

View file

@ -77,7 +77,7 @@ NextTick(
RepeatEvent *re, RepeatEvent *re,
RepeatEventState *res) RepeatEventState *res)
{ {
Tick next_time; Tick next_time = 0;
if (!re) return (Tick)0; if (!re) return (Tick)0;

View file

@ -339,6 +339,9 @@ _DtCms_closest_tick_v4(time_t target, time_t ftick, Period_4 period, int *ordina
struct tm tm1, tm2; struct tm tm1, tm2;
_Xltimeparams localtime_buf; _Xltimeparams localtime_buf;
tm1.tm_isdst = 0;
tm2.tm_isdst = 0;
if (target <= ftick) { if (target <= ftick) {
*ordinal = 1; *ordinal = 1;
return(ftick); return(ftick);

View file

@ -89,7 +89,7 @@ PrevTick(
RepeatEvent *re, RepeatEvent *re,
RepeatEventState *res) RepeatEventState *res)
{ {
Tick next_time; Tick next_time = 0;
Tick _start_time; Tick _start_time;
if (!re) return (Tick)0; if (!re) return (Tick)0;