Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Apr 2002 17:58:56 -0400
From:      Garance A Drosihn <drosih@rpi.edu>
To:        obrien@FreeBSD.ORG
Cc:        sparc64@FreeBSD.ORG
Subject:   Re: hosted-gcc_20020419.tar.bz2 uploaded
Message-ID:  <p05111700b8ea33d21f0a@[128.113.24.47]>
In-Reply-To: <20020422135153.A50570@dragon.nuxi.com>
References:  <20020420194116.A92671@dragon.nuxi.com> <p05111703b8ea1ccbbd40@[128.113.24.47]> <20020422135153.A50570@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 1:51 PM -0700 4/22/02, David O'Brien wrote:
>On Mon, Apr 22, 2002 at 04:40:42PM -0400, Garance A Drosihn wrote:
>>  Well, it worked for me, and I was able to build lpr with it (wooo).
>>  Is it too soon to ask about some of the new warning messages that
>>  come out of it?
>
>What warnings are you seeing?

Well, they are probably legitimate warnings, they're just new
compared to the previous compiler.  Also note that I'm running
with CWARNFLAGS set pretty close to BDECFLAGS.

When compiling lpr/common_source/ctlinfo.c, there's a code
fragment of:

void
ctl_freeinf(struct cjobinfo *cjinf)
{
	struct cjprivate *cpriv;

	cpriv = cjinf->cji_priv;
	if ((cpriv == NULL) || (cpriv != cpriv->pub.cji_priv)) {
		syslog(LOG_ERR, "in ctl_freeinf(%p): invalid cjinf (cpriv %p)",
		    cjinf, cpriv);
		return;
	}
}

|_  ../ctlinfo.c:231: warning: void format, cjobinfo arg (arg 3)
|_  ../ctlinfo.c:231: warning: void format, cjprivate arg (arg 4)

Apparently it wants %p to be used with (void *) or (char *), and not
(struct blahblah *).  If I cast those parameters to (void *) then the
warning goes away.  Is that a change I should make?  Why does it care
what it's a pointer to, as long as it's a pointer to data?

Also, in lpr/common_source/net.c, there's a code fragment of:

	do {
		cp = va_arg(ap, char *);
		n++;
	} while (cp);

where the call to va_arg generates 10 warnings of:

|_  ../net.c:278: warning: pointer of type `void *' used in arithmetic

Should va_arg() be changed?

None of this is urgent, obviously.  I'm just wondering.

-- 
Garance Alistair Drosehn            =   gad@gilead.netel.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-sparc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05111700b8ea33d21f0a>