OSDN Git Service

mathops: remove undefined behaviour from sign_extend()
authorMans Rullgard <mans@mansr.com>
Sun, 9 Oct 2011 11:57:08 +0000 (12:57 +0100)
committerMans Rullgard <mans@mansr.com>
Thu, 13 Oct 2011 14:40:16 +0000 (15:40 +0100)
commitf59bb3d8f3eb50aa182b0d7ae209848b94a507cc
treed87c68c7d16ab3cc02ff1585f30e32788c885607
parent42feaf40700246d9afb9c27ef09a0022ddfdb998
mathops: remove undefined behaviour from sign_extend()

This function intentionally overflows the signed range on
the left shift.  Using this type-punning avoids errors from
the overflow checker without disabling this test globally.

Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/mathops.h