From owner-freebsd-fs Mon Aug 28 9:40:20 2000 Delivered-To: freebsd-fs@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 8F46537B424 for ; Mon, 28 Aug 2000 09:40:17 -0700 (PDT) Received: from fledge.watson.org (robert@fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.9.3/8.9.3) with SMTP id MAA85726 for ; Mon, 28 Aug 2000 12:40:16 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Mon, 28 Aug 2000 12:40:16 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: freebsd-fs@FreeBSD.org Subject: volatile struct proc pointer in procfs_vnops.o Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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