Fix negative shift left reported by UBSan (#757)
authorMatthieu Darbois <mayeut@users.noreply.github.com>
Tue, 26 Apr 2016 20:06:06 +0000 (22:06 +0200)
committerMatthieu Darbois <mayeut@users.noreply.github.com>
Tue, 26 Apr 2016 20:06:06 +0000 (22:06 +0200)
commit6f2ac3ee366a9b587abe9a72febc400ba5b98c24
tree82693154727609333fc8df97dd7d76c2b1eee5ee
parentc559c628539bc8956193a5ff8ac787a0c6fa090c
Fix negative shift left reported by UBSan (#757)

This shall have no performance impact on 2’s complement machine where
the compiler replaces the multiplication by power of two (constant) by
a left shift.
Verified at least on MacOS Xcode 7.3, same assembly generated after fix.
src/lib/openjp2/t1.c