diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2019-07-03 09:59:28 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2019-07-04 13:08:32 -0400 |
commit | e53025f667a3c85eb2e2ea97047d9ee8839afac4 (patch) | |
tree | 1a934c69945d8c9bb24f2570751c4101559f3e8c /src | |
parent | 834371d9f5ab3aed734bb10dbba224f780f080e4 (diff) | |
download | xorg-lib-libXaw-e53025f667a3c85eb2e2ea97047d9ee8839afac4.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')
-rw-r--r-- | src/SmeBSB.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/SmeBSB.c b/src/SmeBSB.c index 52a789a..0b4f94f 100644 --- a/src/SmeBSB.c +++ b/src/SmeBSB.c @@ -348,7 +348,7 @@ XawSmeBSBRedisplay(Widget w, XEvent *event, Region region) if (entry->sme_bsb.label != NULL) { int x_loc = entry->sme_bsb.left_margin; - int len = strlen(entry->sme_bsb.label); + int len = (int)strlen(entry->sme_bsb.label); char *label = entry->sme_bsb.label; int width, t_width; @@ -573,28 +573,28 @@ GetDefaultSize(Widget w, Dimension *width, Dimension *height) if (entry->sme_bsb.label == NULL) *width = 0; else - *width = XmbTextEscapement(entry->sme_bsb.fontset, + *width = (Dimension)XmbTextEscapement(entry->sme_bsb.fontset, entry->sme_bsb.label, - strlen(entry->sme_bsb.label)); - *width += entry->sme_bsb.left_margin + entry->sme_bsb.right_margin; + (int)strlen(entry->sme_bsb.label)); + *width = (Dimension)(*width + (entry->sme_bsb.left_margin + entry->sme_bsb.right_margin)); *height = ext->max_ink_extent.height; - *height = ((int)*height * (ONE_HUNDRED + - entry->sme_bsb.vert_space)) / ONE_HUNDRED; + *height = (Dimension)(((int)*height * (ONE_HUNDRED + + entry->sme_bsb.vert_space)) / ONE_HUNDRED); } else { if (entry->sme_bsb.label == NULL) *width = 0; else - *width = XTextWidth(entry->sme_bsb.font, entry->sme_bsb.label, - strlen(entry->sme_bsb.label)); + *width = (Dimension)XTextWidth(entry->sme_bsb.font, entry->sme_bsb.label, + (int)strlen(entry->sme_bsb.label)); - *width += entry->sme_bsb.left_margin + entry->sme_bsb.right_margin; + *width = (Dimension)(*width + (entry->sme_bsb.left_margin + entry->sme_bsb.right_margin)); - *height = entry->sme_bsb.font->max_bounds.ascent + - entry->sme_bsb.font->max_bounds.descent; + *height = (Dimension)(entry->sme_bsb.font->max_bounds.ascent + + entry->sme_bsb.font->max_bounds.descent); - *height = ((int)*height * (ONE_HUNDRED + - entry->sme_bsb.vert_space)) / ONE_HUNDRED; + *height = (Dimension)(((int)*height * (ONE_HUNDRED + + entry->sme_bsb.vert_space)) / ONE_HUNDRED); } } @@ -678,16 +678,16 @@ GetBitmapInfo(Widget w, Bool is_left) XGetGeometry(XtDisplayOfObject(w), entry->sme_bsb.left_bitmap, &root, &x, &y, &width, &height, &bw, &depth)) { - entry->sme_bsb.left_bitmap_width = width; - entry->sme_bsb.left_bitmap_height = height; + entry->sme_bsb.left_bitmap_width = (Dimension)width; + entry->sme_bsb.left_bitmap_height = (Dimension)height; } } else if (entry->sme_bsb.right_bitmap != None && XGetGeometry(XtDisplayOfObject(w), entry->sme_bsb.right_bitmap, &root, &x, &y, &width, &height, &bw, &depth)) { - entry->sme_bsb.right_bitmap_width = width; - entry->sme_bsb.right_bitmap_height = height; + entry->sme_bsb.right_bitmap_width = (Dimension)width; + entry->sme_bsb.right_bitmap_height = (Dimension)height; } } |