summaryrefslogtreecommitdiff
path: root/src/TMstate.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2019-05-06 05:16:24 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2019-05-06 18:03:53 -0400
commit9112c3c104f0b3ec45ae776279e276034bc7dcc5 (patch)
tree55b4ba329cbaecaadb0093132f1b6c01cf8bb9b4 /src/TMstate.c
parent37dce673d841e7df75091a3b31828431e71bd78f (diff)
fixes for gcc warnings, no object-change
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/TMstate.c')
-rw-r--r--src/TMstate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/TMstate.c b/src/TMstate.c
index 8914c4f..530a6cd 100644
--- a/src/TMstate.c
+++ b/src/TMstate.c
@@ -1424,7 +1424,7 @@ XtTranslations _XtCreateXlations(
xlations = (XtTranslations)
__XtMalloc((Cardinal)(sizeof(TranslationData) +
- (numStateTrees - 1) * sizeof(TMStateTree)));
+ (size_t)(numStateTrees - 1) * sizeof(TMStateTree)));
#ifdef TRACE_TM
LOCK_PROCESS;
if (_XtGlobalTM.numTms == _XtGlobalTM.tmTblSize) {
@@ -1773,8 +1773,8 @@ static XtTranslations UnmergeTranslations(
if (xlations->composers[1]) {
second = UnmergeTranslations(widget, xlations->composers[1],
unmergeXlations,
- (TMShortCard)currIndex +
- xlations->composers[0]->numStateTrees,
+ (TMShortCard)(currIndex +
+ xlations->composers[0]->numStateTrees),
oldBindings, numOldBindings,
newBindings, numNewBindingsRtn);
}
@@ -2020,7 +2020,7 @@ static Boolean ComposeTranslations(
(&((TMSimpleBindData)bindData)->bindTbl[0]);
}
- numBytes =(TMShortCard) (((oldXlations ? oldXlations->numStateTrees : 0)
+ numBytes =(TMShortCard) ((size_t)((oldXlations ? oldXlations->numStateTrees : 0)
+ newXlations->numStateTrees) * sizeof(TMComplexBindProcsRec));
newBindings = (TMComplexBindProcs) XtStackAlloc(numBytes, stackBindings);
XtBZero((char *)newBindings, numBytes);