Summary:ASTERISK-02499: type-punned pointer will break strict-aliasing rules ... hash/ndbm.c out of date ?
Reporter:jacs (jacs)Labels:
Date Opened:2004-09-29 04:36:16Date Closed:2008-01-15 15:11:12.000-0600
Versions:Frequency of
Environment:Attachments:( 0) ndbm.c.diff
( 1) ndbm[1].c.diff.txt
Description:Compiling on FreeBSD I noticed ndbm.c gave
hash/ndbm.c:111: warning: dereferencing type-punned pointer will break strict-aliasing rules.

not sure where this version of hash came from but either replace it with a newer version or add the following patch.
Comments:By: Brian West (bkw918) 2004-09-29 09:11:35

Please add .txt on all diff's so we can view them online.

By: Mark Spencer (markster) 2004-09-29 09:14:17

Where did you pull this code from?  What is its license?  Please note that the db included in Asterisk is a different license from more recent versions.

By: jacs (jacs) 2004-09-29 11:10:37

I pulled the diffs from ndbm.c in the FreeBSD source tree. As you can see from the diffs all its doing is setting up the right data structures to pass to the functions rather than type casting.

By: Mark Spencer (markster) 2004-09-29 11:13:36

But what's the copyright for this file?  Does it match the copyright of the existing one in Asterisk or is it under sleepycat license?

By: jacs (jacs) 2004-09-29 11:21:03

I have upload the file ndbm.c.txt where I pulled the partial diffs from.

By: Brian West (bkw918) 2004-10-16 23:34:10

jacs can you upload that last file again?  GRRR I was trying to download it.. and I hit delete instead.


By: Brian West (bkw918) 2004-10-16 23:41:09

Mark yes it was the exact same copyright header.


By: Mark Spencer (markster) 2004-10-17 18:27:19

Fixed in CVS

By: Russell Bryant (russell) 2004-10-23 08:13:40

fixed in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:10:50.000-0600

Repository: asterisk
Revision: 4031

U   trunk/db1-ast/hash/ndbm.c

r4031 | markster | 2008-01-15 15:10:49 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix ndbm compile warnings (bug ASTERISK-2499)



By: Digium Subversion (svnbot) 2008-01-15 15:11:12.000-0600

Repository: asterisk
Revision: 4059

U   branches/v1-0/db1-ast/hash/ndbm.c

r4059 | russell | 2008-01-15 15:11:12 -0600 (Tue, 15 Jan 2008) | 2 lines

get rid of some compile warnings (bug ASTERISK-2499)