Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Feb 2019 06:57:46 +0000 (UTC)
From:      Bruce Evans <bde@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r344459 - head/usr.sbin/vidcontrol
Message-ID:  <201902220657.x1M6vkcY074628@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bde
Date: Fri Feb 22 06:57:46 2019
New Revision: 344459
URL: https://svnweb.freebsd.org/changeset/base/344459

Log:
  Fix warnings from -Wpointer-sign.

Modified:
  head/usr.sbin/vidcontrol/vidcontrol.c

Modified: head/usr.sbin/vidcontrol/vidcontrol.c
==============================================================================
--- head/usr.sbin/vidcontrol/vidcontrol.c	Fri Feb 22 06:41:47 2019	(r344458)
+++ head/usr.sbin/vidcontrol/vidcontrol.c	Fri Feb 22 06:57:46 2019	(r344459)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902220657.x1M6vkcY074628>