From owner-freebsd-sparc Mon Apr 22 15:29: 3 2002 Delivered-To: freebsd-sparc@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id 06E8C37B6F8; Mon, 22 Apr 2002 15:18:45 -0700 (PDT) Received: from [128.113.24.47] (gilead.acs.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.12.1/8.12.1) with ESMTP id g3MLwv2D346148; Mon, 22 Apr 2002 17:58:57 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20020422135153.A50570@dragon.nuxi.com> References: <20020420194116.A92671@dragon.nuxi.com> <20020422135153.A50570@dragon.nuxi.com> Date: Mon, 22 Apr 2002 17:58:56 -0400 To: obrien@FreeBSD.ORG From: Garance A Drosihn Subject: Re: hosted-gcc_20020419.tar.bz2 uploaded Cc: sparc64@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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