fix an explicit conversion error when building with -Werror