summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2019-05-05 20:49:13 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2019-05-06 18:03:25 -0400
commitfb1d51d4da8f303e92c8b30e4503dc7f9c01b3a8 (patch)
treea004bdee1677b5d92df216fab69f1f476213cc8e
parent5ee9a5d2de4e50552e50247e745f92b61f9784c0 (diff)
fix 5 more simple gcc warnings
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
-rw-r--r--src/Callback.c2
-rw-r--r--src/NextEvent.c2
-rw-r--r--src/PassivGrab.c2
-rw-r--r--src/TMparse.c2
-rw-r--r--src/TMstate.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/Callback.c b/src/Callback.c
index 842f5e2..a04a8bc 100644
--- a/src/Callback.c
+++ b/src/Callback.c
@@ -125,7 +125,7 @@ void _XtAddCallback(
__XtMalloc((Cardinal) (sizeof(InternalCallbackRec) +
sizeof(XtCallbackRec) * (size_t) (count + 1)));
(void) memmove((char *)ToList(icl), (char *)ToList(*callbacks),
- sizeof(XtCallbackRec) * count);
+ sizeof(XtCallbackRec) * (size_t) count);
} else {
icl = (InternalCallbackList)
XtRealloc((char *) icl, (Cardinal)(sizeof(InternalCallbackRec) +
diff --git a/src/NextEvent.c b/src/NextEvent.c
index 365c298..0b5ddc0 100644
--- a/src/NextEvent.c
+++ b/src/NextEvent.c
@@ -680,7 +680,7 @@ WaitLoop:
} else
#else
if ((wt.time_spent.tv_sec * 1000 + wt.time_spent.tv_usec / 1000) < wt.poll_wait) {
- wt.poll_wait -= (wt.time_spent.tv_sec * 1000 + wt.time_spent.tv_usec / 1000);
+ wt.poll_wait -= (int)(wt.time_spent.tv_sec * 1000 + wt.time_spent.tv_usec / 1000);
continue;
} else
#endif
diff --git a/src/PassivGrab.c b/src/PassivGrab.c
index 7d7efdd..650210d 100644
--- a/src/PassivGrab.c
+++ b/src/PassivGrab.c
@@ -169,7 +169,7 @@ static XtServerGrabPtr CreateGrab(
XtSetBit(grab->ownerEvents, ownerEvents);
XtSetBit(grab->pointerMode, pointer_mode);
XtSetBit(grab->keyboardMode, keyboard_mode);
- grab->eventMask = event_mask;
+ grab->eventMask = (unsigned short)event_mask;
XtSetBit(grab->hasExt, need_ext);
grab->confineToIsWidgetWin = (XtWindow (widget) == confine_to);
grab->modifiers = (unsigned short) modifiers;
diff --git a/src/TMparse.c b/src/TMparse.c
index 2fc1e18..be37814 100644
--- a/src/TMparse.c
+++ b/src/TMparse.c
@@ -1874,7 +1874,7 @@ static String CheckForPoundSign(
str++;
start = str;
str = ScanIdent(str);
- len = MIN(19, str-start);
+ len = MIN(19, (int)(str - start));
(void) memmove(operation, start, (size_t) len);
operation[len] = '\0';
if (!strcmp(operation,"replace"))
diff --git a/src/TMstate.c b/src/TMstate.c
index af74eff..8914c4f 100644
--- a/src/TMstate.c
+++ b/src/TMstate.c
@@ -1916,7 +1916,7 @@ static TMBindData MakeBindData(
sizeof(TMSimpleBindProcsRec)));
bindData = (TMBindData) __XtCalloc((Cardinal) sizeof(char), (Cardinal) bytes);
- bindData->simple.isComplex = isComplex;
+ XtSetBit(bindData->simple.isComplex, isComplex);
if (isComplex) {
TMComplexBindData cBindData = (TMComplexBindData)bindData;
/*