diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2019-07-03 09:56:28 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2019-07-04 13:08:33 -0400 |
commit | cc3f0b591987c8edd0c573479c9df34fda253c06 (patch) | |
tree | 6e10cdec12a5d830f6a7caa3e7be6f407b0a7f11 /src/Box.c | |
parent | 2a14a606cb23843ca6c4ba5b8546cc54bccbb29a (diff) | |
download | xorg-lib-libXaw-cc3f0b591987c8edd0c573479c9df34fda253c06.tar.gz |
add casts to quiet gcc conversion-warnings, no object change
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/Box.c')
-rw-r--r-- | src/Box.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -220,7 +220,7 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, && bbw->composite.children[i]->core.width > w) w = bbw->composite.children[i]->core.width; } - w += h_space; + w = (Dimension)(w + h_space); if (w > width) width = w; h = bbw->box.v_space; @@ -235,7 +235,7 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, if (widget->core.mapped_when_managed) num_mapped_children++; /* Compute widget width */ - bw = XtWidth(widget) + (XtBorderWidth(widget)<<1) + h_space; + bw = (Dimension)(XtWidth(widget) + (XtBorderWidth(widget)<<1) + h_space); if ((Dimension)(lw + bw) > width) { if (lw > h_space) { /* At least one widget on this line, and @@ -243,7 +243,7 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, */ AssignMax(w, lw); if (vbox) { - h += lh + bbw->box.v_space; + h = (Dimension)(h + (lh + bbw->box.v_space)); lh = 0; lw = h_space; } @@ -270,10 +270,10 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, */ if (XtIsRealized(widget) && widget->core.mapped_when_managed) XUnmapWindow( XtDisplay(widget), XtWindow(widget)); - XtMoveWidget(widget, (int)lw, (int)h); + XtMoveWidget(widget, (Position)lw, (Position)h); } - lw += bw; - bh = XtHeight(widget) + (XtBorderWidth(widget) << 1); + lw = (Dimension)(lw + bw); + bh = (Dimension)(XtHeight(widget) + (XtBorderWidth(widget) << 1)); AssignMax(lh, bh); } } @@ -281,7 +281,7 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, if (!vbox && width && lw > width && lh < height) { /* reduce width if too wide and height not filled */ Dimension sw = lw, sh = lh; - Dimension width_needed = width; + Dimension width_needed = (Dimension)width; XtOrientation orientation = bbw->box.orientation; bbw->box.orientation = XtorientVertical; @@ -308,7 +308,7 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, if (bbw->composite.num_children == num_mapped_children) XMapSubwindows(XtDisplay((Widget)bbw), XtWindow((Widget)bbw)); else { - int ii = bbw->composite.num_children; + int ii = (int)bbw->composite.num_children; Widget *childP = bbw->composite.children; for (; ii > 0; childP++, ii--) @@ -321,7 +321,7 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, /* Finish off last line */ if (lw > h_space) { AssignMax(w, lw); - h += lh + bbw->box.v_space; + h = (Dimension)(h + (lh + bbw->box.v_space)); } *reply_width = Max(w, 1); @@ -395,7 +395,7 @@ XawBoxQueryGeometry(Widget widget, XtWidgetGeometry *constraint, if (width > (constraint->width >> 1)) /* avoid short int overflow */ width = constraint->width; else - width <<= 1; + width = (Dimension)(width << 1); DoLayout(w, width, 0, &preferred_width, &preferred_height, False); } while (preferred_height > constraint->height && width < constraint->width); @@ -627,7 +627,7 @@ XawBoxRealize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes) #ifndef OLDXAW if (w->core.background_pixmap > XtUnspecifiedPixmap) { pixmap = XawPixmapFromXPixmap(w->core.background_pixmap, XtScreen(w), - w->core.colormap, w->core.depth); + w->core.colormap, (int)w->core.depth); if (pixmap && pixmap->mask) XawReshapeWidget(w, pixmap); } @@ -649,10 +649,10 @@ XawBoxSetValues(Widget current, Widget request, Widget cnew, opix = XawPixmapFromXPixmap(b_old->core.background_pixmap, XtScreen(b_old), b_old->core.colormap, - b_old->core.depth); + (int)b_old->core.depth); npix = XawPixmapFromXPixmap(b_new->core.background_pixmap, XtScreen(b_new), b_new->core.colormap, - b_new->core.depth); + (int)b_new->core.depth); if ((npix && npix->mask) || (opix && opix->mask)) XawReshapeWidget(cnew, npix); } |