Eliminate warnings when building with -Wsign-compare -Wconversion