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)
This commit is contained in:
parent
3e241e2e08
commit
54e57c8145
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208986
@ -35,7 +35,7 @@
|
|||||||
.\" @(#)a.out.5 8.1 (Berkeley) 6/5/93
|
.\" @(#)a.out.5 8.1 (Berkeley) 6/5/93
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd June 5, 1993
|
.Dd June 10, 2010
|
||||||
.Dt A.OUT 5
|
.Dt A.OUT 5
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -307,13 +307,13 @@ structures:
|
|||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
struct nlist {
|
struct nlist {
|
||||||
union {
|
union {
|
||||||
char *n_name;
|
const char *n_name;
|
||||||
long n_strx;
|
long n_strx;
|
||||||
} n_un;
|
} n_un;
|
||||||
unsigned char n_type;
|
unsigned char n_type;
|
||||||
char n_other;
|
char n_other;
|
||||||
short n_desc;
|
short n_desc;
|
||||||
unsigned long n_value;
|
unsigned long n_value;
|
||||||
};
|
};
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
.\" @(#)stab.5 8.1 (Berkeley) 6/5/93
|
.\" @(#)stab.5 8.1 (Berkeley) 6/5/93
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd June 5, 1993
|
.Dd June 10, 2010
|
||||||
.Dt STAB 5
|
.Dt STAB 5
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -79,7 +79,7 @@ consists of the following structure:
|
|||||||
|
|
||||||
struct nlist {
|
struct nlist {
|
||||||
union {
|
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 */
|
long n_strx; /* index into file string table */
|
||||||
} n_un;
|
} n_un;
|
||||||
unsigned char n_type; /* type flag */
|
unsigned char n_type; /* type flag */
|
||||||
|
@ -51,11 +51,11 @@
|
|||||||
struct nlist {
|
struct nlist {
|
||||||
#ifdef _AOUT_INCLUDE_
|
#ifdef _AOUT_INCLUDE_
|
||||||
union {
|
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) */
|
long n_strx; /* file string table offset (on disk) */
|
||||||
} n_un;
|
} n_un;
|
||||||
#else
|
#else
|
||||||
char *n_name; /* symbol name (in memory) */
|
const char *n_name; /* symbol name (in memory) */
|
||||||
int : 8 * (sizeof(long) > sizeof(char *) ?
|
int : 8 * (sizeof(long) > sizeof(char *) ?
|
||||||
sizeof(long) - sizeof(char *) : sizeof(char *) - sizeof(long));
|
sizeof(long) - sizeof(char *) : sizeof(char *) - sizeof(long));
|
||||||
#endif
|
#endif
|
||||||
|
@ -128,7 +128,7 @@ sysctlgatherstruct(void *addr, size_t size, struct scgs_vector *vecarr)
|
|||||||
void
|
void
|
||||||
kget(int idx, void *addr, size_t size)
|
kget(int idx, void *addr, size_t size)
|
||||||
{
|
{
|
||||||
char *symn; /* symbol name */
|
const char *symn; /* symbol name */
|
||||||
size_t tsiz;
|
size_t tsiz;
|
||||||
int rv;
|
int rv;
|
||||||
unsigned long kaddr;
|
unsigned long kaddr;
|
||||||
|
Loading…
Reference in New Issue
Block a user