summaryrefslogtreecommitdiff
path: root/src/GetResList.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/GetResList.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/GetResList.c')
-rw-r--r--src/GetResList.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/GetResList.c b/src/GetResList.c
index c22725c..4c8fe0d 100644
--- a/src/GetResList.c
+++ b/src/GetResList.c
@@ -90,14 +90,14 @@ void XtGetResourceList(
register XtResourceList *list, dlist;
LOCK_PROCESS;
- size = widget_class->core_class.num_resources * sizeof(XtResource);
+ size = (int) (widget_class->core_class.num_resources * sizeof(XtResource));
*resources = (XtResourceList) __XtMalloc((unsigned) size);
if (!widget_class->core_class.class_inited) {
/* Easy case */
(void) memmove((char *) *resources,
- (char *)widget_class->core_class.resources, size);
+ (char *)widget_class->core_class.resources, (size_t) size);
*num_resources = widget_class->core_class.num_resources;
UNLOCK_PROCESS;
return;
@@ -161,14 +161,14 @@ void XtGetConstraintResourceList(
return;
}
- size = class->constraint_class.num_resources * sizeof(XtResource);
+ size = (int) (class->constraint_class.num_resources * sizeof(XtResource));
*resources = (XtResourceList) __XtMalloc((unsigned) size);
if (!class->core_class.class_inited) {
/* Easy case */
(void) memmove((char *) *resources,
- (char *)class->constraint_class.resources, size);
+ (char *)class->constraint_class.resources, (size_t) size);
*num_resources = class->constraint_class.num_resources;
UNLOCK_PROCESS;
return;