I would always initialize counter variables (in this case with a zero) unless this is a global variable, but even then it is a good idea.
And if you don't use or modify the variable inside the loop, then it is a good idea to make it volatile at some compiler optimization levels...
so in your case:
for (volatile int x=0; x<3; x++) {}