The compiler is saying that comparing an
unsigned variable against a
signed variable is –
not allowed considered bad practice. This is because of two’s complement representation of a
(unsigned short) 0xFFFFis 65535, and
(short) 0xFFFFis -1.
They both have same the in-memory representation but mean totally opposite things. So the compiler is protecting you from yourself.
The details on this warning can be found at http://msdn.microsoft.com/en-us/library/y92ktdf2.aspx