diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-08-26 12:28:01 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-08-26 12:28:01 -0700 |
commit | ccdc50c37ce068679746fb9a27fbfb21c96c171e (patch) | |
tree | e5a42992c144cb84f84bd555e1794e9797c4ef96 /src | |
parent | bf985c68acb1244f51ec91414532a2347fbc1c4c (diff) |
Fix 4 -Wuseless-cast warnings from gcc 14.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxkbfile/-/merge_requests/20>
Diffstat (limited to 'src')
-rw-r--r-- | src/cout.c | 2 | ||||
-rw-r--r-- | src/maprules.c | 7 | ||||
-rw-r--r-- | src/xkmread.c | 3 |
3 files changed, 5 insertions, 7 deletions
@@ -1069,7 +1069,7 @@ XkbWriteCFile(FILE *out, char *name, XkbFileInfo *result) else { char *tmp, *hdrdef; - tmp = (char *) strrchr(name, '/'); + tmp = strrchr(name, '/'); if (tmp == NULL) tmp = name; else diff --git a/src/maprules.c b/src/maprules.c index 7e5bbd5..ab1b383 100644 --- a/src/maprules.c +++ b/src/maprules.c @@ -106,12 +106,11 @@ InputLineAddChar(InputLine *line, int ch) { if (line->num_line >= line->sz_line) { if (line->line == line->buf) { - line->line = (char *) _XkbAlloc(line->sz_line * 2); + line->line = _XkbAlloc(line->sz_line * 2); memcpy(line->line, line->buf, line->sz_line); } else { - line->line = - (char *) _XkbRealloc((char *) line->line, line->sz_line * 2); + line->line = _XkbRealloc(line->line, line->sz_line * 2); } line->sz_line *= 2; } @@ -1417,7 +1416,7 @@ XkbRF_GetNamesProp(Display * dpy, char **rf_rtrn, XkbRF_VarDefsPtr vd_rtrn) 0L, _XKB_RF_NAMES_PROP_MAXLEN, False, XA_STRING, &actual_type, &fmt, &nitems, &bytes_after, - (unsigned char **) &data); + &data); if (rtrn != Success) return False; if (rf_rtrn) diff --git a/src/xkmread.c b/src/xkmread.c index e69f236..f279322 100644 --- a/src/xkmread.c +++ b/src/xkmread.c @@ -331,8 +331,7 @@ ReadXkmKeyTypes(FILE *file, XkbFileInfo *result, XkbChangesPtr changes) return -1; } for (n = 0, entry = type->map; n < wire.nMapEntries; n++, entry++) { - if (fread(&wire_entry, SIZEOF(xkmKTMapEntryDesc), 1, file) < - (int) 1) { + if (fread(&wire_entry, SIZEOF(xkmKTMapEntryDesc), 1, file) < 1) { _XkbLibError(_XkbErrBadLength, "ReadXkmKeyTypes", 0); return -1; } |