diff options
author | Mark Harris <mark.hsj@gmail.com> | 2018-07-21 17:55:24 -0700 |
---|---|---|
committer | Mark Harris <mark.hsj@gmail.com> | 2018-07-21 21:35:39 -0700 |
commit | 01b035f8ba4f48e9e1ad9f9407f77ce9a7e4aa44 (patch) | |
tree | 650ba740211d9f62460076d6fea50c29d839758e /src/opus_projection_decoder.c | |
parent | c1c247d7e715100a50ca185948c7336bdd4dfdba (diff) | |
download | libopus-01b035f8ba4f48e9e1ad9f9407f77ce9a7e4aa44.tar.gz |
Silence compiler warnings
clang -Wcast-align warnings with ambisonics enabled
clang -Wnull-pointer-arithmetic warnings in test_opus_api.c
gcc -Wimplicit-fallthrough warnings on arm
msvc warning C4244 in celt_encoder.c with fixed point
Diffstat (limited to 'src/opus_projection_decoder.c')
-rw-r--r-- | src/opus_projection_decoder.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/opus_projection_decoder.c b/src/opus_projection_decoder.c index c879ead7..1ccd8b72 100644 --- a/src/opus_projection_decoder.c +++ b/src/opus_projection_decoder.c @@ -93,12 +93,16 @@ static void opus_projection_copy_channel_out_short( static MappingMatrix *get_demixing_matrix(OpusProjectionDecoder *st) { - return (MappingMatrix*)((char*)st + align(sizeof(OpusProjectionDecoder))); + /* void* cast avoids clang -Wcast-align warning */ + return (MappingMatrix*)(void*)((char*)st + + align(sizeof(OpusProjectionDecoder))); } static OpusMSDecoder *get_multistream_decoder(OpusProjectionDecoder *st) { - return (OpusMSDecoder*)((char*)st + align(sizeof(OpusProjectionDecoder) + + /* void* cast avoids clang -Wcast-align warning */ + return (OpusMSDecoder*)(void*)((char*)st + + align(sizeof(OpusProjectionDecoder) + st->demixing_matrix_size_in_bytes)); } |