On Tue, 2013-02-05 14:00:48 -0500, Bing H Bang wrote:
Doesn't matter if the variable is used before being assigned a value or not. A variable of this import should always be given a default value at the time of declaration. End of story.
Initializing local variables with dummy values takes the compiler the chance to identify a code path were no real value is assigned by mistake.
Arguing about whether its use is before or after it is assigned a value is just silly.
As far as I understand the discussion, it is not about whether the variable is used before a value is assigned to it, as this is pretty obviously not the case. It is about whether the variable should be checked for being NULL or checked for pointing to '\0' before passing it to a printf()-like function.
Ludolf