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
This commit is contained in:
parent
c1c247d7e7
commit
01b035f8ba
6 changed files with 54 additions and 46 deletions
|
@ -58,7 +58,8 @@ opus_int32 mapping_matrix_get_size(int rows, int cols)
|
|||
|
||||
opus_int16 *mapping_matrix_get_data(const MappingMatrix *matrix)
|
||||
{
|
||||
return (opus_int16*)((char*)matrix + align(sizeof(MappingMatrix)));
|
||||
/* void* cast avoids clang -Wcast-align warning */
|
||||
return (opus_int16*)(void*)((char*)matrix + align(sizeof(MappingMatrix)));
|
||||
}
|
||||
|
||||
void mapping_matrix_init(MappingMatrix * const matrix,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue