Skip to content
Snippets Groups Projects
Commit 348e6946 authored by Mark Harris's avatar Mark Harris Committed by Timothy B. Terriberry
Browse files

Eliminate signed division overhead in align()

parent ef867686
No related branches found
No related tags found
No related merge requests found
......@@ -114,7 +114,7 @@ static OPUS_INLINE int align(int i)
{
struct foo {char c; union { void* p; opus_int32 i; opus_val32 v; } u;};
int alignment = offsetof(struct foo, u);
unsigned int alignment = offsetof(struct foo, u);
/* Optimizing compilers should optimize div and multiply into and
for all sensible alignment values. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment