wrlib: fix possible incorrect shifting operations (Coverity #50204, #50205, #50206)
commit6505b2f81c8b7ea004dd0f24167f5ce3c9b641f3
authorChristophe CURIS <christophe.curis@free.fr>
Sat, 14 Jun 2014 17:34:00 +0000 (14 19:34 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 15 Jun 2014 18:45:20 +0000 (15 19:45 +0100)
tree0866db2e63c06f1172e6edb40e6161a6c7be2392
parent1cd354d796aee73cc4334c2f17b1dc00c09d32a2
wrlib: fix possible incorrect shifting operations (Coverity #50204, #50205, #50206)

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