Silence some -Wsign-compare warnings.

command_id can just be made an unsigned int, and change the "toInt" call to "toUInt()"