This is because time() returns long and srand() takes unsigned int. Although both are numeric datatypes, long is larger than int, and if the value returned by time() is big enough, then due to lost precision some other value will be passed to srand(). Nothing really bad happens due to this in srand() application here, and that's why you should get a warning rather than an error - except if you run compiler with -wall (or 'fail at warning') flag.
To fix that explicitly cast time(0) to unsigned int like this: srand((unsignedint)time(0));
Note that it would fix the warning, because there is no reason for srand() not to work, that is not to randomize the output between runs of this code.