summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2019-07-04 20:25:01 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2019-07-04 21:07:34 -0400
commit29144b39e9b7e5bad43b5e6013ecb4cfac049bd5 (patch)
treebe31cb169d07e002a8757e98c118394fcf9dbd28
parentccca832690f7ee56469786d7926e79f219259cea (diff)
downloadxorg-lib-libXaw-29144b39e9b7e5bad43b5e6013ecb4cfac049bd5.tar.gz
fix some type/conversion compiler warnings (no object change)
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
-rw-r--r--src/Text.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Text.c b/src/Text.c
index ff3efb8..b380a8c 100644
--- a/src/Text.c
+++ b/src/Text.c
@@ -644,7 +644,7 @@ static Boolean
CvtJustifyModeToString(Display *dpy, XrmValue *args, Cardinal *num_args,
XrmValue *fromVal, XrmValue *toVal, XtPointer *data)
{
- static char *buffer;
+ static String buffer;
Cardinal size;
switch (*(XawTextJustifyMode *)fromVal->addr) {
@@ -1382,8 +1382,8 @@ _BuildLineTable(TextWidget ctx, XawTextPosition position, int line)
lt->y = y;
ctx->text.clear_to_eol = True;
}
- if (lt->textWidth != width) {
- if (lt->textWidth > width)
+ if (lt->textWidth != (Cardinal)width) {
+ if (lt->textWidth > (Cardinal)width)
ctx->text.clear_to_eol = True;
lt->textWidth = (unsigned)width;
}
@@ -1805,7 +1805,7 @@ UpdateTextInLine(TextWidget ctx, int line, int x1, int x2)
False, &left, &width, &height);
if (line == ctx->text.lt.lines)
right = -1;
- else if (x2 >= (lt->textWidth - (unsigned)from_x))
+ else if ((Cardinal)x2 >= (lt->textWidth - (unsigned)from_x))
right = lt[1].position - 1;
else {
from_x += width;
@@ -4151,6 +4151,9 @@ TextClassRec textClassRec = {
/* simple */
{
XawTextChangeSensitive, /* change_sensitive */
+#ifndef OLDXAW
+ NULL,
+#endif
},
/* text */
{