Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/dkctl Use explicit cast instead of -Wno-pointer-sign. T...



details:   https://anonhg.NetBSD.org/src/rev/bbb921158d8d
branches:  trunk
changeset: 768018:bbb921158d8d
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sat Aug 06 16:34:40 2011 +0000

description:
Use explicit cast instead of -Wno-pointer-sign. The site in question is
already marked XXX so there's not much point in whitewashing it.

diffstat:

 sbin/dkctl/Makefile |  6 +-----
 sbin/dkctl/dkctl.c  |  8 ++++----
 2 files changed, 5 insertions(+), 9 deletions(-)

diffs (46 lines):

diff -r acdb7203789b -r bbb921158d8d sbin/dkctl/Makefile
--- a/sbin/dkctl/Makefile       Sat Aug 06 16:23:55 2011 +0000
+++ b/sbin/dkctl/Makefile       Sat Aug 06 16:34:40 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.6 2011/06/20 07:43:59 mrg Exp $
+#      $NetBSD: Makefile,v 1.7 2011/08/06 16:34:40 dholland Exp $
 
 PROG=  dkctl
 MAN=   dkctl.8
@@ -7,7 +7,3 @@
 DPADD+=        ${LIBUTIL}
 
 .include <bsd.prog.mk>
-
-.if defined(HAVE_GCC) || defined(HAVE_PCC)
-COPTS.dkctl.c+=        -Wno-pointer-sign
-.endif
diff -r acdb7203789b -r bbb921158d8d sbin/dkctl/dkctl.c
--- a/sbin/dkctl/dkctl.c        Sat Aug 06 16:23:55 2011 +0000
+++ b/sbin/dkctl/dkctl.c        Sat Aug 06 16:34:40 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dkctl.c,v 1.18 2009/08/02 18:16:08 spz Exp $   */
+/*     $NetBSD: dkctl.c,v 1.19 2011/08/06 16:34:40 dholland Exp $      */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: dkctl.c,v 1.18 2009/08/02 18:16:08 spz Exp $");
+__RCSID("$NetBSD: dkctl.c,v 1.19 2011/08/06 16:34:40 dholland Exp $");
 #endif
 
 
@@ -550,8 +550,8 @@
        if (argc != 4)
                usage();
 
-       /* XXX Unicode. */
-       if (strlcpy(dkw.dkw_wname, argv[0], sizeof(dkw.dkw_wname)) >=
+       /* XXX Unicode: dkw_wname is supposed to be utf-8 */
+       if (strlcpy((char *)dkw.dkw_wname, argv[0], sizeof(dkw.dkw_wname)) >=
            sizeof(dkw.dkw_wname))
                errx(1, "Wedge name too long; max %zd characters",
                    sizeof(dkw.dkw_wname) - 1);



Home | Main Index | Thread Index | Old Index