summaryrefslogtreecommitdiff
path: root/src/Font.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2020-04-21 20:53:35 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2020-04-21 20:56:05 -0400
commit844271305a28e87031562dfeb43defbea02960a2 (patch)
tree20aa7ca73888baef3dd8ca5c7626a4bc9b6330c4 /src/Font.c
parent53b59ddfc114a55d26e9717a1b4822f1b18c40ca (diff)
reduce gcc-normal warnings using casts (no object change)
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/Font.c')
-rw-r--r--src/Font.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Font.c b/src/Font.c
index 09d2ae91..d4ebdaca 100644
--- a/src/Font.c
+++ b/src/Font.c
@@ -107,7 +107,7 @@ XFontStruct *XLoadQueryFont(
LockDisplay(dpy);
GetReq(OpenFont, req);
seq = dpy->request; /* Can't use extended sequence number here */
- nbytes = req->nbytes = name ? strlen(name) : 0;
+ nbytes = req->nbytes = (CARD16) (name ? strlen(name) : 0);
req->fid = fid = XAllocID(dpy);
req->length += (nbytes+3)>>2;
Data (dpy, name, nbytes);
@@ -662,7 +662,7 @@ int _XF86LoadQueryLocaleFont(
if (!name)
return 0;
- l = strlen(name);
+ l = (int) strlen(name);
if (l < 2 || name[l - 1] != '*' || name[l - 2] != '-')
return 0;
charset = NULL;
@@ -679,7 +679,7 @@ int _XF86LoadQueryLocaleFont(
return 0;
if (_XlcNCompareISOLatin1(name + l - 2 - (p - charset), charset, p - charset))
return 0;
- if (strlen(p + 1) + l - 1 >= sizeof(buf) - 1)
+ if (strlen(p + 1) + (size_t) l - 1 >= sizeof(buf) - 1)
return 0;
strcpy(buf, name);
strcpy(buf + l - 1, p + 1);