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

Re: [PATCH] Clean up definition and use of SVN_NEON_0_25 macro

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-10-25 21:07:19 CEST

Julian Foad wrote:
>
> Define the SVN_NEON_0_25 macro always as either 0 or 1 (never undefined), and
> test it consistently with "#if" (never "#ifdef"), so that we can enable the
> "undefined; assuming 0" compiler warnings and get none of them. This is

Here's the alternative:

[[[
Clean up the use of the SVN_NEON_0_25 macro to avoid compiler warnings.

As the SVN_NEON_0_25 macro is either defined or undefined (not always defined
to 0 or 1), test it consistently with "#ifdef" (never "#if"), so that we can
enable the "undefined; assuming 0" compiler warnings and get none of them.
This is the only macro that was being defined and tested inconsistently.

* subversion/libsvn_ra_dav/ra_dav.h
* subversion/libsvn_ra_dav/commit.c
* subversion/libsvn_ra_dav/fetch.c
* subversion/libsvn_ra_dav/session.c
* subversion/libsvn_ra_dav/util.c
   Always use "#if[n]def", never "#if", to test SVN_NEON_0_25.
]]]

This has the following advantages: consistent with the way we define and use
our other yes/no macros; doesn't require re-running autoheader when you update
to this patched version; the build system doesn't get those little bits of
duplication that the previous patch added.

Here are the disadvantages: more lines are touched by this patch; Karl says he
prefers the other ("#if") form (but failed to convince me why).

Actually, I now am convinced that this is the better choice, and I'm just going
to do it. It's not worthy of spending any more of our time on it.

r17014.

Phew.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 25 21:33:25 2005

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.