Fix compiler warnings about different sizes and sign.