If the loop variable iterates from zero to some number stored in a
variable of unsigned type, the loop variable should be of the same
unsigned type. This was not always the case, and if it was, the loop
variable was sometimes called i, which is confusing because i usually
indicates a signed quantity.
Quoting Andrew Morton:
Doing "unsigned i;" is an act of insane vandalism, punishable by
spending five additional years coding in fortran.