I don't understand why this cast is needed here... the operand is already unsigned (size_t is defined as unsigned) so it must be related to 32/64 bit. I think it would be better to define the variable as size_t.