Fix cpluspluscheck in checksum code

C++ is more picky about comparing signed and unsigned integers.