From 5e8e733906b4a0e565339a4844fb360d38892652 Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Thu, 7 Oct 2004 00:22:03 +0000 Subject: minor fixes to comply with C99's new pointer aliasing rules --- src/share/replaygain_synthesis/replaygain_synthesis.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/share') 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) { -- cgit v1.2.1