diff options
author | Mark Harris <mark.hsj@gmail.com> | 2015-08-07 11:24:48 +0300 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2015-08-07 20:25:02 +0300 |
commit | 4feb0dff995205031891036b0686e75fcac2562d (patch) | |
tree | 97b0b9c148d67c410edc1f9f181ae1b101f31b2d /src | |
parent | 348e6946c187eb68839e71a03101d75b5865a389 (diff) |
Silence clang -Wcast-align warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/opus_multistream_encoder.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/opus_multistream_encoder.c b/src/opus_multistream_encoder.c index 6e87337d..7163d144 100644 --- a/src/opus_multistream_encoder.c +++ b/src/opus_multistream_encoder.c @@ -98,7 +98,8 @@ static opus_val32 *ms_get_preemph_mem(OpusMSEncoder *st) else ptr += align(mono_size); } - return (opus_val32*)(ptr+st->layout.nb_channels*120*sizeof(opus_val32)); + /* void* cast avoids clang -Wcast-align warning */ + return (opus_val32*)(void*)(ptr+st->layout.nb_channels*120*sizeof(opus_val32)); } static opus_val32 *ms_get_window_mem(OpusMSEncoder *st) @@ -117,7 +118,8 @@ static opus_val32 *ms_get_window_mem(OpusMSEncoder *st) else ptr += align(mono_size); } - return (opus_val32*)ptr; + /* void* cast avoids clang -Wcast-align warning */ + return (opus_val32*)(void*)ptr; } static int validate_encoder_layout(const ChannelLayout *layout) |