wrlib: fix possible incorrect shifting operations (Coverity #50203)
commit1cd354d796aee73cc4334c2f17b1dc00c09d32a2
authorChristophe CURIS <christophe.curis@free.fr>
Sat, 14 Jun 2014 17:33:59 +0000 (14 19:33 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 15 Jun 2014 18:45:20 +0000 (15 19:45 +0100)
treea7de917de42b74461fae8f4d6b7bd57a47e4b8d8
parent5f1e25152c47f0df20a5aeb520c066304914cf78
wrlib: fix possible incorrect shifting operations (Coverity #50203)

As pointed by Coverity, the shift operation performed for color-to-pixel
transform may not behave as well as expected because of the types used
(Coverity pointing suspicious sign extension because of int type being
involved).

The new code tries to leave no open interpretation to the compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
wrlib/convert.c