unsigned and signed types are different ways to interpret data.
For example, if you have the raw data 0xFFFFFFFF, this can be interpretted one of two ways:
1) signed, it is interpretted as -1
2) unsigned, it is interpretted as 4294967295
When you compare signed 'i' with unsigned 'u', the compiler gets confused because it doesn't know how you want to compare the different types. Do you want to compare them as signed variables? or unsigned?
As a result, it (should) give you a warning. Then it'll do whatever it feels is best, which in this case would be treating them both as unsigned (since it's "larger").
The end result is that you are comparing unsigned i (4294967295) to unsigned u (5). Since i is much larger than u, the loop body never executes.