Fix compiler warnings by explicit type casts. In this case, we know that those values can't be bigger than int can take, neither become negative. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>