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

Re: svn commit: r18144 - in trunk/subversion/libsvn_fs_base: . bdb

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2006-01-22 19:31:22 CET

On Wed, Jan 18, 2006 at 10:12:26PM +0100, Branko Čibej wrote:
> Philip Martin wrote:
> >Malcolm Rowe <malcolm-svn-dev@farside.org.uk> writes:
> >
> >
> >>All four apr_atomic_casptr() calls in bdb/env.c generate the following
> >>warning for me, breaking my '-Wall -Werror' build (gcc 3.4.4 on RHEL4):
> >>
> >>../svn-live-trunk-srcdir/subversion/libsvn_fs_base/bdb/env.c: In function
> >>`bdb_cache_init':
> >>../svn-live-trunk-srcdir/subversion/libsvn_fs_base/bdb/env.c:340:
> >>warning: dereferencing type-punned pointer will break strict-aliasing
> >>rules
> >>
> >
> >I'm using gcc 4.0.3 and I don't get that warning.
> >
> Yes, I can't see any type-punned pointers there.
>

You'd defined bdb_cache_state as 'volatile void *', and so you're passing
a 'volatile void **' to apr_atomic_casptr(), for which the default
(macro) implementation of casts its first argument to (apr_uint32_t *)
- see include/apr_atomic.h:285. Isn't that a type-punned pointer?

In any case, you fixed it in r18170, so thanks.

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jan 22 19:32:03 2006

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.