summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2019-07-03 09:56:38 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2019-07-04 13:08:33 -0400
commit2a14a606cb23843ca6c4ba5b8546cc54bccbb29a (patch)
tree0104ef3109df2c62778b8c76db95437037ccf8dd
parent40af785c9cbe82c0caf3d143980f4e92d1ac3f67 (diff)
downloadxorg-lib-libXaw-2a14a606cb23843ca6c4ba5b8546cc54bccbb29a.tar.gz
add casts to quiet gcc conversion-warnings, no object change
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
-rw-r--r--src/Command.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Command.c b/src/Command.c
index 4535423..57f3631 100644
--- a/src/Command.c
+++ b/src/Command.c
@@ -295,9 +295,9 @@ HighlightRegion(CommandWidget cbw)
rect.width = XtWidth(cbw);
rect.height = XtHeight(cbw);
XUnionRectWithRegion(&rect, emptyRegion, outerRegion);
- rect.x = rect.y = cbw->command.highlight_thickness;
- rect.width -= cbw->command.highlight_thickness * 2;
- rect.height -= cbw->command.highlight_thickness * 2;
+ rect.x = rect.y = (short)cbw->command.highlight_thickness;
+ rect.width = (rect.width - cbw->command.highlight_thickness * 2);
+ rect.height = (rect.height - cbw->command.highlight_thickness * 2);
XUnionRectWithRegion(&rect, emptyRegion, innerRegion);
XSubtractRegion(outerRegion, innerRegion, outerRegion);
@@ -469,13 +469,13 @@ PaintCommandWidget(Widget w, XEvent *event, Region region, Bool change)
XClearArea(XtDisplay(w), XtWindow(w),
0, cbw->command.highlight_thickness,
cbw->command.highlight_thickness,
- XtHeight(cbw) - (cbw->command.highlight_thickness<<1),
+ (unsigned)(XtHeight(cbw) - (cbw->command.highlight_thickness<<1)),
False);
XClearArea(XtDisplay(w), XtWindow(w),
XtWidth(cbw) - cbw->command.highlight_thickness,
cbw->command.highlight_thickness,
cbw->command.highlight_thickness,
- XtHeight(cbw) - (cbw->command.highlight_thickness<<1),
+ (unsigned)(XtHeight(cbw) - (cbw->command.highlight_thickness<<1)),
False);
XClearArea(XtDisplay(w), XtWindow(w),
0, XtHeight(cbw) - cbw->command.highlight_thickness,
@@ -486,8 +486,8 @@ PaintCommandWidget(Widget w, XEvent *event, Region region, Bool change)
int offset = cbw->command.highlight_thickness / 2;
XDrawRectangle(XtDisplay(w),XtWindow(w), rev_gc, offset, offset,
- XtWidth(cbw) - cbw->command.highlight_thickness,
- XtHeight(cbw) - cbw->command.highlight_thickness);
+ (unsigned)(XtWidth(cbw) - cbw->command.highlight_thickness),
+ (unsigned)(XtHeight(cbw) - cbw->command.highlight_thickness));
}
}
}
@@ -593,7 +593,7 @@ ShapeButton(CommandWidget cbw, Bool checkRectangular)
if (cbw->command.shape_style == XawShapeRoundedRectangle) {
corner_size = XtWidth(cbw) < XtHeight(cbw) ?
XtWidth(cbw) : XtHeight(cbw);
- corner_size = (corner_size * cbw->command.corner_round) / 100;
+ corner_size = (Dimension)((corner_size * cbw->command.corner_round) / 100);
}
if (checkRectangular || cbw->command.shape_style != XawShapeRectangle) {