1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-14 20:22:21 +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(), ABObj project = proj_get_project(),
newObj, newObj,
root, root,
newroot, newroot = NULL,
parent; parent;
ABSelectedRec sel; ABSelectedRec sel;
STRING name = (STRING) NULL; STRING name = (STRING) NULL;

View file

@ -275,7 +275,7 @@ process_chord_extend(
int dum_x; int dum_x;
int dum_y; int dum_y;
unsigned int mask_ret; unsigned int mask_ret;
Cursor cur_cursor; Cursor cur_cursor = curs_nw;
x_conn_fullscreen_chord(widget, root_win, 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); 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)) if (new_dir != find_drag_dirn(start_x, start_y, cur_x, cur_y))
{ {
int do_cursor = 1;
switch(new_dir) switch(new_dir)
{ {
case NORTH_WEST: case NORTH_WEST:
@ -304,19 +306,21 @@ process_chord_extend(
break; break;
default: default:
/* catch-all to avoid compiler warnings */ /* catch-all to avoid compiler warnings */
do_cursor = 0;
break; break;
} }
if (XGrabPointer(display, root_win, True, if(do_cursor) {
if (XGrabPointer(display, root_win, True,
ButtonReleaseMask|PointerMotionMask, ButtonReleaseMask|PointerMotionMask,
GrabModeAsync, GrabModeAsync, root_win, GrabModeAsync, GrabModeAsync, root_win,
cur_cursor, CurrentTime) != cur_cursor, CurrentTime) != GrabSuccess)
GrabSuccess) {
{ fprintf(stderr, "Pointer grab failed.\n");
fprintf(stderr, "Pointer grab failed.\n"); XUngrabKeyboard(display, CurrentTime);
XUngrabKeyboard(display, CurrentTime); XUngrabServer(display);
XUngrabServer(display); return;
return; }
} }
} }
x_conn_fullscreen_chord(widget, root_win, 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); Widget label_wid = XmOptionButtonGadget(action_type_opmenu);
XmString xm_act_label = (XmString)NULL; XmString xm_act_label = (XmString)NULL;
char *act_label = NULL; char *act_label = NULL;
int i; int i = -1;
AB_FUNC_TYPE func_type = AB_FUNC_UNDEF; AB_FUNC_TYPE func_type = AB_FUNC_UNDEF;
XtVaGetValues(label_wid, XmNlabelString, &xm_act_label, NULL); XtVaGetValues(label_wid, XmNlabelString, &xm_act_label, NULL);
@ -3904,6 +3904,7 @@ get_cur_func_type(void)
func_type = AB_FUNC_HELP_VOLUME; func_type = AB_FUNC_HELP_VOLUME;
break; break;
default: default:
func_type = AB_FUNC_UNDEF;
break; break;
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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