[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: Branko Čibej <brane_at_xbc.nu>
Date: 2006-01-22 19:39:47 CET

Malcolm Rowe wrote:
> 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?
>
The prototype for apr_atomic_casptr says that the first parameter is
volatile void **. If there's a macro doing a cast getting in between,
then that's a bug in APR and should be reported there.

> In any case, you fixed it in r18170, so thanks.
>
Not me. :) It was maxb.

-- Brane

---------------------------------------------------------------------
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:40:15 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.