ref: 4feb0dff995205031891036b0686e75fcac2562d
parent: 348e6946c187eb68839e71a03101d75b5865a389
author: Mark Harris <[email protected]>
date: Thu Aug 6 21:24:48 EDT 2015
Silence clang -Wcast-align warnings
--- a/src/opus_multistream_encoder.c
+++ b/src/opus_multistream_encoder.c
@@ -98,7 +98,8 @@
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 @@
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)