Adding "unsigned int" type casting to comparison

Due to a compilation flag on the Linux build, any comparison must have
been done with the same type ([-Werror=sign-compare]).

Signed-off-by: Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>