PIDs haven't been limited to 16-bits for a long time. I guess the default integer in these things is 32-bit signed.
But, yeah, this could be solved if uint promoted to larger for the comparison.