summaryrefslogtreecommitdiff
path: root/src/Manage.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2019-03-17 17:19:45 -0400
committerAlan Coopersmith <alan.coopersmith@oracle.com>2019-04-06 10:31:25 -0700
commitcf9e8c73c4ffa671d580938c9a84d6ef0bd2710d (patch)
tree21cd4cab8b92df9f9050ea8df40d9cc35bed451d /src/Manage.c
parentfb7e899e94dd402c868e8eb59ccf32284732f6ac (diff)
This cleans up the "easy" warning fixes which can be made using my
Regress script, comparing object-files before/after the edits: https://invisible-island.net/ansification/index.html https://invisible-island.net/scripts/readme.html The changes are casts, which quiet the gcc warnings about implicit conversion that my "gcc-normal" script would show. I avoided reformatting the code. The change reduces the number of gcc warnings from 769 to 163. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/Manage.c')
-rw-r--r--src/Manage.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Manage.c b/src/Manage.c
index 4ff7219..f97ec2a 100644
--- a/src/Manage.c
+++ b/src/Manage.c
@@ -138,8 +138,8 @@ static void UnmanageChildren(
if ((pw!=NULL) && XtIsRealized (pw))
XClearArea (XtDisplay (pw), XtWindow (pw),
r->rectangle.x, r->rectangle.y,
- r->rectangle.width + (r->rectangle.border_width << 1),
- r->rectangle.height + (r->rectangle.border_width << 1),
+ (unsigned) (r->rectangle.width + (r->rectangle.border_width << 1)),
+ (unsigned) (r->rectangle.height + (r->rectangle.border_width << 1)),
TRUE);
}
@@ -237,7 +237,7 @@ static void ManageChildren(
if (num_children <= MAXCHILDREN) {
unique_children = cache;
} else {
- unique_children = (WidgetList) __XtMalloc(num_children * sizeof(Widget));
+ unique_children = (WidgetList) __XtMalloc((Cardinal) ((size_t)num_children * sizeof(Widget)));
}
num_unique_children = 0;
for (i = 0; i < num_children; i++) {
@@ -302,8 +302,8 @@ static void ManageChildren(
if (pw != NULL)
XClearArea (XtDisplay (pw), XtWindow (pw),
r->rectangle.x, r->rectangle.y,
- r->rectangle.width + (r->rectangle.border_width << 1),
- r->rectangle.height + (r->rectangle.border_width << 1),
+ (unsigned) (r->rectangle.width + (r->rectangle.border_width << 1)),
+ (unsigned) (r->rectangle.height + (r->rectangle.border_width << 1)),
TRUE);
}
}
@@ -432,10 +432,10 @@ void XtChangeManagedSet(
parent = XtParent(*childp);
childp = unmanage_children;
- for (i = num_unmanage; --i >= 0 && XtParent(*childp) == parent; childp++);
+ for (i = (int) num_unmanage; --i >= 0 && XtParent(*childp) == parent; childp++);
call_out = (i >= 0);
childp = manage_children;
- for (i = num_manage; --i >= 0 && XtParent(*childp) == parent; childp++);
+ for (i = (int) num_manage; --i >= 0 && XtParent(*childp) == parent; childp++);
if (call_out || i >= 0) {
XtAppWarningMsg(app, "ambiguousParent", XtNxtChangeManagedSet,
XtCXtToolkitError, "Not all children have same parent",