Fix warnings from -Wpointer-sign.

This commit is contained in:
bde 2019-02-22 06:57:46 +00:00
parent d68a4690a6
commit 426c5cade7

View File

@ -1390,8 +1390,8 @@ get_terminal_emulator(int i, struct term_info *tip)
tip->ti_index = i;
if (ioctl(0, CONS_GETTERM, tip) == 0)
return (1);
strlcpy(tip->ti_name, "unknown", sizeof(tip->ti_name));
strlcpy(tip->ti_desc, "unknown", sizeof(tip->ti_desc));
strlcpy((unsigned char *)tip->ti_name, "unknown", sizeof(tip->ti_name));
strlcpy((unsigned char *)tip->ti_desc, "unknown", sizeof(tip->ti_desc));
return (0);
}
@ -1415,7 +1415,7 @@ set_terminal_emulator(const char *name)
struct term_info old_ti, ti;
get_terminal_emulator(0, &old_ti);
strlcpy(ti.ti_name, name, sizeof(ti.ti_name));
strlcpy((unsigned char *)ti.ti_name, name, sizeof(ti.ti_name));
if (ioctl(0, CONS_SETTERM, &ti) != 0)
warn("SETTERM '%s'", name);
get_terminal_emulator(0, &ti);