5036 WARN Local variable does not seem to be initialized
5037 WARN Variable does not seem to be initialized
5057 HINT Local variable does not seem to be initialized
5058 HINT Variable does not seem to be initialized
5059 WARN Function result variable does not seem to be initialized
5060 HINT Function result variable does not seem to be initialized
Generally speaking I think it is "prudent" to write code in such a way that _none_ of the above hints and warnings are emitted by the compiler.
Even something as simple as a local variable not being initialized can be the cause of a hard to find bug because the value of the local variable is unpredictable.
I think it is simply good programming to _always_ initialize _all_ variables.
I think the bad habit of not initializing all variables as a matter of course comes from the obsession of making code as fast as possible. I think an obsession of making the code _correct_ is a much more useful and justified obsession. That said, I stopped using FPC's "= ();" to initialize records because of the outrageously bad code it generates, now I just ZeroMemory the things.
As far as initializing records, I believe that every record should have an "Init" procedure that sets _all_ of its fields to appropriate default values. Here, I have to admit that while I more often than not do that, there are times when I skip that step (usually for code I consider "not important".) I mention this because I don't want to appear to be one of those "do as I say, not as I do".
Anyway, initializing variables only costs a few clock cycles, in today's 4 to 6 Ghz machines, it would really take a lot of initializations to make a perceptible difference in the execution time but, it can definitely make a very perceptible difference in the amount of time spent (not) debugging the program.