Date: Mon, 28 Aug 2000 12:40:16 -0400 (EDT) From: Robert Watson <rwatson@FreeBSD.org> To: freebsd-fs@FreeBSD.org Subject: volatile struct proc pointer in procfs_vnops.o Message-ID: <Pine.NEB.3.96L.1000828123827.84062J-100000@fledge.watson.org>
next in thread | raw e-mail | index | archive | help
I'm getting a couple of warnings compiling procfs_vnops.o with p_cansee()
instead of PRISON_CHECK(), as the struct proc *p is qualified as volatile:
int pcnt = 0;
volatile struct proc *p = allproc.lh_first;
...
while (pcnt < i) {
p = p->p_list.le_next;
if (!p)
goto done;
if (p_cansee(curproc, p, NULL))
continue;
pcnt++;
}
../../miscfs/procfs/procfs_vnops.c: In function `procfs_readdir':
../../miscfs/procfs/procfs_vnops.c:882: warning: passing arg 2 of
`p_cansee' discards qualifiers from pointer target type
../../miscfs/procfs/procfs_vnops.c:886: warning: passing arg 2 of
`p_cansee' discards qualifiers from pointer target type
Does anyone know why that struct proc is marked as volatile? Can the
volatile qualifier safely be removed?
Robert N M Watson
robert@fledge.watson.org http://www.watson.org/~robert/
PGP key fingerprint: AF B5 5F FF A6 4A 79 37 ED 5F 55 E9 58 04 6A B1
TIS Labs at Network Associates, Safeport Network Services
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1000828123827.84062J-100000>
