Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Nov 2000 16:22:22 -0800
From:      Kris Kennaway <kris@FreeBSD.org>
To:        "David E. O'Brien" <obrien@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/contrib/gcc.295 c-common.c c-decl.c c-tree.h toplev.c src/contrib/gcc.295/cp decl2.c
Message-ID:  <20001126162222.B41584@citusc17.usc.edu>
In-Reply-To: <200011262353.PAA90874@freefall.freebsd.org>; from obrien@FreeBSD.org on Sun, Nov 26, 2000 at 03:53:24PM -0800
References:  <200011262353.PAA90874@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--wzJLGUyc3ArbnUjN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Nov 26, 2000 at 03:53:24PM -0800, David E. O'Brien wrote:
> obrien      2000/11/26 15:53:24 PST
>=20
>   Modified files:
>     contrib/gcc.295      c-common.c c-decl.c c-tree.h toplev.c=20
>     contrib/gcc.295/cp   decl2.c=20
>   Log:
>   Add "-Wnon-const-format" which checks for non-constant format strings f=
or
>   auditing purposes.
>  =20
>   I am reluctant to bring this into our native GCC tree due to maintenance
>   reasons... but since Kris already did the porting work and it won't be
>   pulling any files off the vendor branch..... but I will not port this
>   functionality forward to newer versions of GCC if it requires more than
>   5 min of work, and if these changes do cleanly apply to GCC snapshots,
>   I will remove it the moment GCC changes underneath theses changes.
>  =20
>   Submitted by:	kris
>   Obtained from:	NetBSD

Thanks David.

Anyone interested is encouraged to grab a chunk of

http://www.freebsd.org/~kris/gcc-format-audit

(let me know which bits you're claiming so there isn't any duplication
of effort) and work through them. You should also be on the
audit@FreeBSD.org mailing list where we like to bitch about this kind
of thing :-)

Library functions which take format string arguments should be
documented, and internal functions within a program need to be checked
to see whether any of the invocations use a non-constant format
string. Some of the warnings can be squashed by explicitly declaring a
constant format string to be const, etc.

Be careful about source code which is included or compiled in another
program in another part of the tree - for functions which don't have
common names like panic() your favourite source code indexing tool
like glimpse can show you other possible external uses.

Kris

--wzJLGUyc3ArbnUjN
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (FreeBSD)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjohqT4ACgkQWry0BWjoQKVpvQCeNvuGppw7FfGFMXTMUehwELh8
gq8AoMe89m2GpksmFAcN0XoMwr7JyXIA
=383E
-----END PGP SIGNATURE-----

--wzJLGUyc3ArbnUjN--


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




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