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:
parent
85684c337a
commit
2c134302c8
13 changed files with 24 additions and 19 deletions
|
@ -575,7 +575,7 @@ find_appts(Widget widget, XtPointer client_data, XmPushButtonCallbackStruct *cbs
|
|||
int num_items, mo, last_match_total = 0, match_total = 0;
|
||||
pr_pos xy;
|
||||
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_return_code stat;
|
||||
CSA_entry_handle *entries = NULL;
|
||||
|
|
|
@ -60,7 +60,7 @@ get_font(
|
|||
XmFontContext fl_context;
|
||||
XmFontListEntry fl_entry;
|
||||
XtPointer fl_entry_font,
|
||||
font_to_use;
|
||||
font_to_use = NULL;
|
||||
char *fl_entry_font_tag;
|
||||
Boolean found_font_set = False,
|
||||
found_font_struct = False;
|
||||
|
|
|
@ -682,7 +682,7 @@ dialog_popup(Widget parent, ...) {
|
|||
char *text_str = NULL, *ptr, buf[MAXNAMELEN], *help_str;
|
||||
Pixmap px;
|
||||
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);
|
||||
XmString xmstr;
|
||||
Dialog_create_op op;
|
||||
|
@ -1301,7 +1301,7 @@ Dimension *dim,
|
|||
... )
|
||||
{
|
||||
va_list ap;
|
||||
int i, _high;
|
||||
int i, _high = 0;
|
||||
Dimension _max;
|
||||
Widget _targetW, _highestW;
|
||||
Arg _args[3];
|
||||
|
@ -1355,7 +1355,7 @@ Dimension *dim,
|
|||
... )
|
||||
{
|
||||
va_list ap;
|
||||
int i, _wide;
|
||||
int i, _wide = 0;
|
||||
Widget _targetW, _widestW;
|
||||
Dimension _max;
|
||||
XtWidgetGeometry geo;
|
||||
|
@ -1425,7 +1425,7 @@ Dimension *dim,
|
|||
... )
|
||||
{
|
||||
va_list ap;
|
||||
int i, _high;
|
||||
int i, _high = 0;
|
||||
Dimension _max;
|
||||
Widget _targetW, _highestW;
|
||||
Arg _args[3];
|
||||
|
|
|
@ -2638,7 +2638,7 @@ extern Boolean
|
|||
get_editor_vals_from_ui(Props_pu *pu, Props *p) {
|
||||
int i, hr, min;
|
||||
char buf[5];
|
||||
Widget text;
|
||||
Widget text = NULL;
|
||||
DisplayType dt = get_int_prop(p, CP_DEFAULTDISP);
|
||||
Reminders_val *val;
|
||||
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) {
|
||||
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"));
|
||||
switch (status) {
|
||||
|
||||
|
|
|
@ -2128,8 +2128,10 @@ build_todo_list(ToDo *t, Tick date, Glance glance, CSA_entry_handle **a, CSA_uin
|
|||
state = CSA_STATUS_COMPLETED;
|
||||
use_state = B_TRUE;
|
||||
}
|
||||
else
|
||||
else {
|
||||
state = 0;
|
||||
use_state = B_FALSE;
|
||||
}
|
||||
|
||||
setup_range(&range_attrs, &ops, &range_count, start, stop,
|
||||
CSA_TYPE_TODO, state, use_state, t->cal->general->version);
|
||||
|
|
|
@ -377,7 +377,7 @@ text_to_lines(char *s, int n)
|
|||
Lines *prev_l = NULL, *l = NULL, *head= NULL;
|
||||
int i = 0;
|
||||
char *_p;
|
||||
int clen;
|
||||
int clen = 0;
|
||||
|
||||
if (s == NULL || n <= 0) return NULL;
|
||||
|
||||
|
@ -1227,7 +1227,7 @@ Dtcm_appointment *allocate_appt_struct (Allocation_reason reason, int version, .
|
|||
va_list pvar;
|
||||
CmDataList *api_ids = CmDataListCreate();
|
||||
Dtcm_appointment *appt;
|
||||
int def_attr_count;
|
||||
int def_attr_count = 0;
|
||||
|
||||
/*
|
||||
* The Dtcm_appointment wrapper array
|
||||
|
|
|
@ -778,7 +778,7 @@ cms_insert_entry_5_svc(cms_insert_args *args, struct svc_req *svcrq)
|
|||
cms_key key;
|
||||
char *user;
|
||||
uint access, needaccess;
|
||||
Appt_4 *appt;
|
||||
Appt_4 *appt = NULL;
|
||||
|
||||
if (debug)
|
||||
fprintf(stderr, "cms_insert_entry_5_svc called\n");
|
||||
|
|
|
@ -341,10 +341,10 @@ _DtCmsGetEntryAttrByKey(
|
|||
CSA_return_code stat;
|
||||
CSA_return_code stat2;
|
||||
cms_entry *entry = NULL;
|
||||
char *stime, *etime;
|
||||
char *stime, *etime = NULL;
|
||||
char sbuf[TIME_BUF_LEN], ebuf[TIME_BUF_LEN];
|
||||
time_t firsttick = 0;
|
||||
List_node *lnode;
|
||||
List_node *lnode = NULL;
|
||||
cms_get_entry_attr_res_item *res = NULL;
|
||||
|
||||
if (entry_r == NULL && res_r == NULL)
|
||||
|
@ -529,7 +529,7 @@ _EnumerateSequence(
|
|||
stat == CSA_SUCCESS && tick < start2;
|
||||
tick = NextTick(tick, fsttick, lnode->re, restate))
|
||||
{
|
||||
char *stime, *etime;
|
||||
char *stime, *etime = NULL;
|
||||
char sbuf[TIME_BUF_LEN], ebuf[TIME_BUF_LEN];
|
||||
|
||||
if (tick <= 0 || tick > lnode->lasttick)
|
||||
|
|
|
@ -77,7 +77,7 @@ ClosestTick(
|
|||
RepeatEvent *re,
|
||||
RepeatEventState **res)
|
||||
{
|
||||
Tick closest_tick,
|
||||
Tick closest_tick = 0,
|
||||
real_start_time,
|
||||
target_time = _target_time;
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ LastTick(
|
|||
const Tick start_time,
|
||||
RepeatEvent *re)
|
||||
{
|
||||
Tick last_time;
|
||||
Tick last_time = 0;
|
||||
|
||||
if (!re) return (Tick)0;
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ NextTick(
|
|||
RepeatEvent *re,
|
||||
RepeatEventState *res)
|
||||
{
|
||||
Tick next_time;
|
||||
Tick next_time = 0;
|
||||
|
||||
if (!re) return (Tick)0;
|
||||
|
||||
|
|
|
@ -339,6 +339,9 @@ _DtCms_closest_tick_v4(time_t target, time_t ftick, Period_4 period, int *ordina
|
|||
struct tm tm1, tm2;
|
||||
_Xltimeparams localtime_buf;
|
||||
|
||||
tm1.tm_isdst = 0;
|
||||
tm2.tm_isdst = 0;
|
||||
|
||||
if (target <= ftick) {
|
||||
*ordinal = 1;
|
||||
return(ftick);
|
||||
|
|
|
@ -89,7 +89,7 @@ PrevTick(
|
|||
RepeatEvent *re,
|
||||
RepeatEventState *res)
|
||||
{
|
||||
Tick next_time;
|
||||
Tick next_time = 0;
|
||||
Tick _start_time;
|
||||
|
||||
if (!re) return (Tick)0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue