[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Silencing deprecated warnings in deprecated functions

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 09 Sep 2008 20:07:23 +0100

On Sat, 2008-09-06 at 19:27 -0700, Blair Zajac wrote:
> I don't like to see warnings when I compile svn. So is there a way we can
> silence the deprecated warnings when functionN() calls functionN+1() which is
> also deprecated to functionN+2().

Me too. I see this as mainly a problem with the compiler I use (GCC
4.1.2 currently) as it would be sensible for it to have a mode for
ignoring calls to deprecated functions from within a deprecated
function. It is inconsistent: it does ignore the use of deprecated data
types within a deprecated data type definition.

> Can we do that by marking functionN+1() somehow that its ok to call it?

I don't know a way to do that.

> If not, then we could move all the deprecated functions into new deprecated.c
> files for each library and use -Wno-deprecated-declarations only on that one.
> Say client_deprecated.c for libsvn_client/ functions.

+0. It sounds to me like that would be a relatively tidy solution. I
don't much mind that it involves moving some functions to a new source
file and separating Foo() and Foo1() from Foo2(). (For me, "jump to
definition" is the most important feature of any programmers' editor.)

OTOH, I have currently disabled put "CFLAGS += -Wno-deprecated" in
my ./configure options, and treat this as one of those warnings that
some of us will want to have a look at sometimes, but not most of the
time.

OTOH[1], it has clearly shown up a bunch of places where we weren't
aware that we were using deprecated functions, and people of gone and
fixed some/all of them, so the warning is clearly doing some good.

So, I don't really mind whether it stays as-is, or gets disabled by
default, or if we move the functions like you suggest.

- Julian

[1] "On The Original Hand"

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-09 21:07:40 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.