1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-12 11:12:18 +00:00

dtappbuilder: Resolve uninitialized warnings

This commit is contained in:
Peter Howkins 2021-12-22 01:28:09 +00:00 committed by Jon Trulson
parent 2c134302c8
commit 93a0b4bc7e
10 changed files with 31 additions and 23 deletions

View file

@ -2201,7 +2201,7 @@ abobj_paste(
ABObj project = proj_get_project(),
newObj,
root,
newroot,
newroot = NULL,
parent;
ABSelectedRec sel;
STRING name = (STRING) NULL;

View file

@ -275,7 +275,7 @@ process_chord_extend(
int dum_x;
int dum_y;
unsigned int mask_ret;
Cursor cur_cursor;
Cursor cur_cursor = curs_nw;
x_conn_fullscreen_chord(widget, root_win,
@ -288,6 +288,8 @@ process_chord_extend(
new_dir = find_drag_dirn(start_x, start_y, new_x, new_y);
if (new_dir != find_drag_dirn(start_x, start_y, cur_x, cur_y))
{
int do_cursor = 1;
switch(new_dir)
{
case NORTH_WEST:
@ -304,19 +306,21 @@ process_chord_extend(
break;
default:
/* catch-all to avoid compiler warnings */
do_cursor = 0;
break;
}
if (XGrabPointer(display, root_win, True,
if(do_cursor) {
if (XGrabPointer(display, root_win, True,
ButtonReleaseMask|PointerMotionMask,
GrabModeAsync, GrabModeAsync, root_win,
cur_cursor, CurrentTime) !=
GrabSuccess)
{
fprintf(stderr, "Pointer grab failed.\n");
XUngrabKeyboard(display, CurrentTime);
XUngrabServer(display);
return;
cur_cursor, CurrentTime) != GrabSuccess)
{
fprintf(stderr, "Pointer grab failed.\n");
XUngrabKeyboard(display, CurrentTime);
XUngrabServer(display);
return;
}
}
}
x_conn_fullscreen_chord(widget, root_win,

View file

@ -3872,7 +3872,7 @@ get_cur_func_type(void)
Widget label_wid = XmOptionButtonGadget(action_type_opmenu);
XmString xm_act_label = (XmString)NULL;
char *act_label = NULL;
int i;
int i = -1;
AB_FUNC_TYPE func_type = AB_FUNC_UNDEF;
XtVaGetValues(label_wid, XmNlabelString, &xm_act_label, NULL);
@ -3904,6 +3904,7 @@ get_cur_func_type(void)
func_type = AB_FUNC_HELP_VOLUME;
break;
default:
func_type = AB_FUNC_UNDEF;
break;
}

View file

@ -1412,6 +1412,9 @@ more_help_dispatch(Widget widget, XtPointer clientData, XtPointer callData)
*cp++ = 0;
vol = buffer;
loc = cp;
} else {
/* No slash found, give up */
return;
}
if(GeneralHelpDialog == (Widget)NULL) {

View file

@ -1884,7 +1884,7 @@ group_align_hcenters(
cell_width,
cell_height,
group_width,
group_height,
group_height = 0,
offset,
gridline,
i,
@ -2235,8 +2235,8 @@ group_align_labels(
for (i = 0; i < num_columns; i++)
{
ABObj ref_obj;
int ref_width;
ABObj ref_obj = NULL;
int ref_width = 0;
for (j = 0; j < num_rows; j++)
one_col[j] = get_child(obj, i, j);
@ -2300,7 +2300,7 @@ group_align_vcenters(
num_rows,
cell_width,
cell_height,
group_width,
group_width = 0,
group_height,
offset,
gridline,

View file

@ -4068,7 +4068,7 @@ menu_newCB(
PropStateInfo *pstate;
AB_PROP_TYPE alt_prop_type = AB_PROP_FIXED;
ABObj module;
Widget prop_dialog;
Widget prop_dialog = NULL;
STRING base = NULL;
STRING unique_name;
STRING menu_name;

View file

@ -1117,7 +1117,7 @@ static LibFuncRec abmfP_lrc_more_help_dispatch =
"{\n"
" int i;\n"
" Arg wargs[10];\n"
" String buffer, vol, loc;\n"
" String buffer, vol = NULL, loc = NULL;\n"
" char *cp;\n"
" static Widget GeneralHelpDialog = (Widget) 0;\n"
" Widget help_dialog = (Widget)clientData;\n"
@ -3902,7 +3902,7 @@ static LibFuncRec abmfP_lrc_align_labels =
")\n"
"{\n"
" WidgetList children_list = NULL,\n"
" one_col;\n"
" one_col = NULL;\n"
" Widget previous_child = 0,\n"
" child,\n"
" ref_widget,\n"

View file

@ -1246,7 +1246,7 @@ dtb_more_help_dispatch(
{
int i;
Arg wargs[10];
String buffer, vol, loc;
String buffer, vol = NULL, loc = NULL;
char *cp;
static Widget GeneralHelpDialog = (Widget) NULL;
Widget help_dialog = (Widget)clientData;
@ -3310,7 +3310,7 @@ align_labels(
)
{
WidgetList children_list = NULL,
one_col;
one_col = NULL;
Widget previous_child = NULL,
child,
ref_widget,

View file

@ -527,7 +527,7 @@ object_child_into_module(
sym_entry_type *uil_section_entries
)
{
ABObjPtr ret_val;
ABObjPtr ret_val = NULL;
sym_widget_entry_type *uil_widget;
if (uil_section_entries == (sym_entry_type *)NULL)
@ -1112,7 +1112,7 @@ parse_uil(
Uil_status_type compile_stat;
int user_mess_data = 1;
int user_stat_data = 1;
char *ret_val;
char *ret_val = NULL;
/* Set up command description structure */

View file

@ -520,7 +520,7 @@ objxm_comp_set_color_args(
static XtArgVal bgvalue;
static BOOL cgen_args;
AB_TRAVERSAL trav;
Widget widget;
Widget widget = NULL;
Pixel pixel;
ABObj subObj;
int status;