libFLAC/md5: Fix for cast-align warnings on ARM.

Rather than the buffer into format_input_() as a FLAC__byte pointer, pass
it as a pointer to a union of three pointers, one each for for FLAC__byte,
FLAC__int16 and FLAC_int32.
This should have zero measurable performance impact.
This commit is contained in:
Erik de Castro Lopo
2014-06-29 21:52:06 +10:00
parent 51c6567f62
commit 7590d99b29
2 changed files with 44 additions and 38 deletions

View File

@@ -28,11 +28,17 @@
#include "FLAC/ordinals.h"
typedef union {
FLAC__byte *p8;
FLAC__int16 *p16;
FLAC__int32 *p32;
} FLAC__multibyte;
typedef struct {
FLAC__uint32 in[16];
FLAC__uint32 buf[4];
FLAC__uint32 bytes[2];
FLAC__byte *internal_buf;
FLAC__multibyte internal_buf;
size_t capacity;
} FLAC__MD5Context;