Date: Sun, 1 Mar 1998 18:00:45 +1100 From: Bruce Evans <bde@zeta.org.au> To: bde@zeta.org.au, nrice@emu.sourcee.com Cc: dkelly@HiWAAY.net, freebsd-stable@FreeBSD.ORG, pst@FreeBSD.ORG, wollman@FreeBSD.ORG Subject: Re: Tonight's cvsup'ed -stable fails "make buildword" Message-ID: <199803010700.SAA02404@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> >cc1: warnings being treated as errors >> >/usr/obj/usr/src/tmp/usr/include/stdio.h:366: warning: `__sputc' defined but not used >> ... >> In other words, libskey is now broken even in -stable if -O isn't in CFLAGS. > >It also appears that `lpr' is broken for similar reasons. Yes, lpr doesn't put -W in CFLAGS (this in combination with -Werror would break lpr in CFLAGS because of warnings about sign mismatches), but the "defined but not used warnings" are actually enabled by -Wunused and -Wall, and lpr puts -Wall in CFLAGS. Unused statics in "standard" headers are never reported, but buildworld installs the standard headers in nonstandard places, and gcc's test for standardness is simplistic. The warning can be prevented by declaring all possibly-unused static functions and objects in headers as having attribute __unused: #include <sys/cdefs.h> static __inline int __sputc(int _c, FILE *_p) __unused; static __inline int __sputc(int _c, FILE *_p) { ... } I don't know how to attach the attribute to the function definition here. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803010700.SAA02404>