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

libdtwidget: resolve uninitialized warnings

This commit is contained in:
Peter Howkins 2021-12-20 23:56:17 +00:00 committed by Jon Trulson
parent 182aa9fe5a
commit 37e03a1820
5 changed files with 7 additions and 7 deletions

View file

@ -1290,8 +1290,8 @@ Draw(
XRectangle clip; XRectangle clip;
Position p_x, p_y, s_x, s_y; Position p_x, p_y, s_x, s_y;
Dimension width = 0, height = 0; Dimension width = 0, height = 0;
Pixmap pix; Pixmap pix = 0;
Pixmap mask; Pixmap mask = 0;
int index; int index;
Dimension left = 0, right = 0, top = 0, bottom = 0; Dimension left = 0, right = 0, top = 0, bottom = 0;
Dimension v_pad; Dimension v_pad;

View file

@ -1784,7 +1784,7 @@ extractFontMetrics(
XmFontListEntry next_entry; XmFontListEntry next_entry;
XmFontType type_return = XmFONT_IS_FONT; XmFontType type_return = XmFONT_IS_FONT;
XtPointer tmp_font; XtPointer tmp_font;
XFontStruct *font; XFontStruct *font = NULL;
Boolean have_font_struct = False; Boolean have_font_struct = False;
Boolean have_font_set = False; Boolean have_font_set = False;
Boolean use_font_set = False; Boolean use_font_set = False;

View file

@ -3063,7 +3063,7 @@ Draw(
GC gc; GC gc;
XRectangle clip; XRectangle clip;
Position p_x, p_y, s_x, s_y; Position p_x, p_y, s_x, s_y;
Dimension width, height; Dimension width = 0, height = 0;
unsigned char behavior = G_Behavior (g); unsigned char behavior = G_Behavior (g);
Position adj_x, adj_y; Position adj_x, adj_y;
int rec_width=0,begin=0,diff=0; int rec_width=0,begin=0,diff=0;

View file

@ -940,7 +940,7 @@ _SpinBoxBeginLine( DtSpinBoxWidget spin,
Cardinal *num_params) Cardinal *num_params)
{ {
int new_position; int new_position;
float new_current; float new_current = 0.0;
if (*num_params != 0) /* params means label or arrows */ if (*num_params != 0) /* params means label or arrows */
spin = (DtSpinBoxWidget)XtParent(spin); spin = (DtSpinBoxWidget)XtParent(spin);
@ -978,7 +978,7 @@ _SpinBoxEndLine( DtSpinBoxWidget spin,
Cardinal *num_params) Cardinal *num_params)
{ {
int new_position; int new_position;
float new_current; float new_current = 0.0;
if (*num_params != 0) /* params means label or arrows */ if (*num_params != 0) /* params means label or arrows */
spin = (DtSpinBoxWidget)XtParent(spin); spin = (DtSpinBoxWidget)XtParent(spin);

View file

@ -985,7 +985,7 @@ GeometryManager(
height_req = request->request_mode & CWHeight, height_req = request->request_mode & CWHeight,
bw_req = request->request_mode & CWBorderWidth, bw_req = request->request_mode & CWBorderWidth,
almost = False; almost = False;
XtGeometryResult result, parent_result; XtGeometryResult result = XtGeometryYes, parent_result;
XtWidgetGeometry parent_req, parent_reply; XtWidgetGeometry parent_req, parent_reply;