This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: In debug/tst-chk1 we purposely test gets and getwd?
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 8 Sep 2014 15:28:13 +0000
- Subject: Re: In debug/tst-chk1 we purposely test gets and getwd?
- Authentication-results: sourceware.org; auth=none
- References: <540D0803 dot 5030502 at redhat dot com>
On Sun, 7 Sep 2014, Carlos O'Donell wrote:
> It seems in debug/tst-chk1.c we purposely test gets
> and getwd, but both of those trigger deprecation
> warnings. It would be nice to eventually turn on
> -Werror.
Yes, for various testcases it will be necessary to disable some warnings,
or to use -Wno-error= for them, because tests need to cover code using
deprecated interfaces, and code doing bad things that can be detected at
compile time (e.g. some _FORTIFY_SOURCE tests).
There are already various -Wno- settings in the makefiles which it may
make sense to review to see if they are still necessary or if there are
better ways to address those warnings (if still present) - we'll need to
work out our policy on when to use such settings, and how to handle
hard-to-fix warnings in general, when using -Werror by default.
(At one point I thought maybe we should enable -Werror at first only for
installed code, not tests. But I now think it would be simpler to enable
it everywhere and then selectively disable it for particular tests;
probably most warnings in tests are in fact easy to fix without affecting
what's being tested.)
--
Joseph S. Myers
joseph@codesourcery.com