Fixed compiler warning

This Pull Request fix a compiler warning when directive -Wall is enabled.

The warning was about the comparison between an int and a size_t (unsigned) type. While the int is positive there is no problem, but to avoid the warning I added a cast (size_t) to the integer.