Get rid of some warnings with GCC 10, from Thomas Klausner.

This commit is contained in:
nicm
2023-06-30 13:19:32 +00:00
parent 2546216019
commit 4e57894e85
7 changed files with 12 additions and 9 deletions

View File

@ -709,7 +709,7 @@ tty_term_read_list(const char *name, int fd, char ***caps, u_int *ncaps,
s = tmp;
break;
case TTYCODE_FLAG:
n = tigetflag((char *) ent->name);
n = tigetflag((char *)ent->name);
if (n == -1)
continue;
if (n)
@ -717,6 +717,8 @@ tty_term_read_list(const char *name, int fd, char ***caps, u_int *ncaps,
else
s = "0";
break;
default:
fatalx("unknown capability type");
}
*caps = xreallocarray(*caps, (*ncaps) + 1, sizeof **caps);
xasprintf(&(*caps)[*ncaps], "%s=%s", ent->name, s);