Just assign your literal value to an unsigned int and use that in the comparision.
The compiler does not look at the value of the literal in a compare. The literal is assumed signed.
However, you can assign a literal to an unsigned int since you are assigning an integer to and interger. The rules permit the assignment of any interger type to any other integer type. In this case the compiler assumes you know what you are doing.
-
unsigned int a = 0;
-
unsigned int b = -1;
-
In the above example, there is not a whimper from the compiler. Here the sign bit from -1 becomes a data bit in b. Presumably, there could be a reason for this so the assignment is allowed.