honestly I do not understand why you should use the %lu in place of %u since you are working with an int.
%lu should be used (in its very basic explanation) for unsigned long.
It will most probably print garbage if your compiler uses (and of course it does in 99% of the situation) different storage size for int and long.
For instance, according to C standard, an unsigned int is, in terms of storage size "At least 16 bits in size. " while unsigned long is "At least 32 bits in size."
Now, let's take as an example 16 bits for int and 32 bits for long and lets' consider a untypical example where the memory is all zeroed at the moment you run the program.
You value 12 is represented in memory as:
00000000 00001100
and if you would print with an %u would result in 12:
In place, if instruct printf to print as %lu it would result that the memory taken in the printf is:
00000000 00001100 00000000 00000000
which corresponds to the long value of 786432
Edit:
Passing the value of the variable to the printf function (and not the pointer (and the size) of the variable) makes the code working anyway. My previous "explanation" was mostly to explain why the warning is raised and why it is "typically" a wrong approach.