[asterisk-bugs] [Asterisk 0012932]: [patch] Union rather than cast for outbuf (translate.h)

noreply at bugs.digium.com noreply at bugs.digium.com
Sun Jun 29 12:48:42 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12932 
====================================================================== 
Reported By:                snuffy
Assigned To:                kpfleming
====================================================================== 
Project:                    Asterisk
Issue ID:                   12932
Category:                   Core/Portability
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 124869 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             06-26-2008 10:28 CDT
Last Modified:              06-29-2008 12:48 CDT
====================================================================== 
Summary:                    [patch] Union rather than cast for outbuf
(translate.h)
Description: 
This is part of the things i tried to achieve under solaris to fix
alginment issues. ( issue http://bugs.digium.com/view.php?id=11485 )

This has only had very basic tests done.. alaw/ulaw to gsm etc.
Playback seemed fine.

Probably want to rename some of the unions var names but its a start
====================================================================== 

---------------------------------------------------------------------- 
 kpfleming - 06-29-08 12:48  
---------------------------------------------------------------------- 
Yes, I understand. However, this exposed a larger problem (which was the
point of your compiler telling you that), which is that 'outbuf' does not
point to an address that is aligned properly for 16-bit access. Just
casting it (or using a union to force the cast) won't fix that problem.

I've created a new branch at team/kpfleming/aligner with some new code to
fix this problem and ensure that all the elements we allocate *after* the
translator private structure are properly aligned. Please give this a try
and let me know how it works for you. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-29-08 12:48  kpfleming      Note Added: 0089414                          
======================================================================




More information about the asterisk-bugs mailing list