Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/opus_projection_decoder.c')
-rw-r--r--src/opus_projection_decoder.c8
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));
}