From owner-freebsd-audit Mon Jul 16 7:19: 2 2001 Delivered-To: freebsd-audit@freebsd.org Received: from coffee.q9media.com (coffee.q9media.com [216.94.229.19]) by hub.freebsd.org (Postfix) with ESMTP id 3F97837B407 for ; Mon, 16 Jul 2001 07:18:59 -0700 (PDT) (envelope-from mike@coffee.q9media.com) Received: (from mike@localhost) by coffee.q9media.com (8.11.2/8.11.2) id f6GEZM631927; Mon, 16 Jul 2001 10:35:22 -0400 (EDT) (envelope-from mike) Date: Mon, 16 Jul 2001 10:35:22 -0400 (EDT) Message-Id: <200107161435.f6GEZM631927@coffee.q9media.com> To: David Malone From: Mike Barcroft Cc: audit@FreeBSD.org Subject: Re: inetd(8) warns patch Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG David Malone writes: > > I would appreciate your comments on the patch at the end of this > > message. I'm not entirely sure about removing the legacy setproctitle > > stuff. If you'd like to keep it in there, the prototype for main() > > will need two versions. One for the legacy setproctitle and one > > for normal use. > > Looks fine to me, as long as __unused is considered acceptable in > our code. (I know you can get rid of the __unused for compilers > that don't understand it by using a #define, but if another compiler > denotes unused variables/parameters by "unused int blah;" then > you can't generate this statement.) __unused is the preferred way to mark unused variables. It's our wrapper for gcc's __attribute__((__unused__)). See for details. > Would you like me to commit it? Yes, thanks. > (I'm also slightly suprised that the WARNS flags don't whine about > the nasty SWAP marco which contains a gccism.) gcc doesn't really care about gccisms unless -ansi and -pedantic are specified. That macro could probably be made portable using a third argument and a union. > BTW - I was looking at doing WARNS stuff for syslogd and it doesn't > seem to be very easy 'cos syslogd uses writev(2) and iov_base > pointers are of type "char *" not "const char *". I'm not subscribed > to -audit so I don't know if anyone has a suggested workaround for > these situations. Gererally speaking, it's usually a good idea to fix the root problem. If writev(2) and friends don't need to write to that variable, it's questionable why it's a char *. Some things just don't work with WARNS, such as RPC, because of library evilness. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message