[PATCH] setterm: clean up gcc warnings | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
From: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
* clean up code, gcc warnings
(try compilation with "-Wall -Wp,-D_FORTIFY_SOURCE=2")
setterm.c:1188: warning: pointer targets in passing argument 2 of '__builtin___strncpy_chk' differ in signedness
setterm.c:1188: warning: pointer targets in passing argument 2 of '__strncpy_ichk' differ in signedness
Signed-off-by: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
---
misc-utils/setterm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- util-linux-ng-2.13.orig/misc-utils/setterm.c
+++ util-linux-ng-2.13/misc-utils/setterm.c
@@ -1185,7 +1185,7 @@ try_ioctl:
cols = screenbuf[1];
for (i=0; i<rows; i++) {
- strncpy(buf, screenbuf+2+(cols*i), cols);
+ strncpy(buf, (const char *)screenbuf+2+(cols*i), cols);
buf[cols] = '\0';
j = cols;
while (--j && (buf[j] == ' '))
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Site Home] [Netdev] [Ethernet Bridging] [Linux Wireless] [Kernel Newbies] [Memory] [Security] [Linux for Hams] [Netfilter] [Bugtraq] [Rubini] [Photo] [Yosemite] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux RAID] [Linux Admin] [Samba] [Video 4 Linux] [Linux Resources]