summaryrefslogtreecommitdiff
path: root/src/share
diff options
context:
space:
mode:
authorJosh Coalson <jcoalson@users.sourceforce.net>2004-10-07 00:22:03 +0000
committerJosh Coalson <jcoalson@users.sourceforce.net>2004-10-07 00:22:03 +0000
commit5e8e733906b4a0e565339a4844fb360d38892652 (patch)
tree3c8b4daf3783d9f201bf0b38e24dc7901fe25bc2 /src/share
parent91b4ce51ab7fcf99eaaf1baba1b792873dc2d919 (diff)
downloadflac-5e8e733906b4a0e565339a4844fb360d38892652.tar.gz
minor fixes to comply with C99's new pointer aliasing rules
Diffstat (limited to 'src/share')
-rw-r--r--src/share/replaygain_synthesis/replaygain_synthesis.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/share/replaygain_synthesis/replaygain_synthesis.c b/src/share/replaygain_synthesis/replaygain_synthesis.c
index 30cf11e4..c53907bc 100644
--- a/src/share/replaygain_synthesis/replaygain_synthesis.c
+++ b/src/share/replaygain_synthesis/replaygain_synthesis.c
@@ -236,10 +236,14 @@ void FLAC__replaygain_synthesis__init_dither_context(DitherContext *d, int bits,
static FLAC__INLINE FLAC__int64 dither_output_(DitherContext *d, FLAC__bool do_dithering, int shapingtype, int i, double Sum, int k)
{
- double doubletmp, Sum2;
+ union {
+ double d;
+ FLAC__int64 i;
+ } doubletmp;
+ double Sum2;
FLAC__int64 val;
-#define ROUND64(x) ( doubletmp = (x) + d->Add + (FLAC__int64)FLAC__I64L(0x001FFFFD80000000), *(FLAC__int64*)(&doubletmp) - (FLAC__int64)FLAC__I64L(0x433FFFFD80000000) )
+#define ROUND64(x) ( doubletmp.d = (x) + d->Add + (FLAC__int64)FLAC__I64L(0x001FFFFD80000000), doubletmp.i - (FLAC__int64)FLAC__I64L(0x433FFFFD80000000) )
if(do_dithering) {
if(shapingtype == 0) {