From owner-svn-src-all@FreeBSD.ORG Thu Jun 10 14:19:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D210A1065677; Thu, 10 Jun 2010 14:19:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6EC48FC1B; Thu, 10 Jun 2010 14:19:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5AEJpPU074095; Thu, 10 Jun 2010 14:19:51 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5AEJpX7074091; Thu, 10 Jun 2010 14:19:51 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201006101419.o5AEJpX7074091@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 10 Jun 2010 14:19:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208986 - in head: share/man/man5 sys/sys usr.bin/ipcs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2010 14:19:52 -0000 Author: bz Date: Thu Jun 10 14:19:51 2010 New Revision: 208986 URL: http://svn.freebsd.org/changeset/base/208986 Log: Make the char *n_name member of struct nlist 'const'. This avoids errors or __DECONST() from places with higher WARNS levels. Adjust a local cache variable in ipcs to const as well to compile in the new world order. Suggested by: jhb Reviewed by: jhb, kib, brueffer (man) Modified: head/share/man/man5/a.out.5 head/share/man/man5/stab.5 head/sys/sys/nlist_aout.h head/usr.bin/ipcs/ipc.c Modified: head/share/man/man5/a.out.5 ============================================================================== --- head/share/man/man5/a.out.5 Thu Jun 10 12:15:09 2010 (r208985) +++ head/share/man/man5/a.out.5 Thu Jun 10 14:19:51 2010 (r208986) @@ -35,7 +35,7 @@ .\" @(#)a.out.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 5, 1993 +.Dd June 10, 2010 .Dt A.OUT 5 .Os .Sh NAME @@ -307,13 +307,13 @@ structures: .Bd -literal -offset indent struct nlist { union { - char *n_name; - long n_strx; + const char *n_name; + long n_strx; } n_un; - unsigned char n_type; - char n_other; - short n_desc; - unsigned long n_value; + unsigned char n_type; + char n_other; + short n_desc; + unsigned long n_value; }; .Ed .Pp Modified: head/share/man/man5/stab.5 ============================================================================== --- head/share/man/man5/stab.5 Thu Jun 10 12:15:09 2010 (r208985) +++ head/share/man/man5/stab.5 Thu Jun 10 14:19:51 2010 (r208986) @@ -32,7 +32,7 @@ .\" @(#)stab.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 5, 1993 +.Dd June 10, 2010 .Dt STAB 5 .Os .Sh NAME @@ -79,7 +79,7 @@ consists of the following structure: struct nlist { union { - char *n_name; /* for use when in-core */ + const char *n_name; /* for use when in-core */ long n_strx; /* index into file string table */ } n_un; unsigned char n_type; /* type flag */ Modified: head/sys/sys/nlist_aout.h ============================================================================== --- head/sys/sys/nlist_aout.h Thu Jun 10 12:15:09 2010 (r208985) +++ head/sys/sys/nlist_aout.h Thu Jun 10 14:19:51 2010 (r208986) @@ -51,11 +51,11 @@ struct nlist { #ifdef _AOUT_INCLUDE_ union { - char *n_name; /* symbol name (in memory) */ + const char *n_name; /* symbol name (in memory) */ long n_strx; /* file string table offset (on disk) */ } n_un; #else - char *n_name; /* symbol name (in memory) */ + const char *n_name; /* symbol name (in memory) */ int : 8 * (sizeof(long) > sizeof(char *) ? sizeof(long) - sizeof(char *) : sizeof(char *) - sizeof(long)); #endif Modified: head/usr.bin/ipcs/ipc.c ============================================================================== --- head/usr.bin/ipcs/ipc.c Thu Jun 10 12:15:09 2010 (r208985) +++ head/usr.bin/ipcs/ipc.c Thu Jun 10 14:19:51 2010 (r208986) @@ -128,7 +128,7 @@ sysctlgatherstruct(void *addr, size_t si void kget(int idx, void *addr, size_t size) { - char *symn; /* symbol name */ + const char *symn; /* symbol name */ size_t tsiz; int rv; unsigned long kaddr;