Commit 4feb0dff authored by Mark Harris's avatar Mark Harris Committed by Jean-Marc Valin

Silence clang -Wcast-align warnings

parent 348e6946
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment