Removing uninitialized_var()
Removing uninitialized_var()
Posted Dec 21, 2012 5:32 UTC (Fri) by dvdeug (subscriber, #10998)In reply to: Removing uninitialized_var() by giraffedata
Parent article: Removing uninitialized_var()
Anytime this comes up, the code is hard to read. Variables that don't have valid values in chunks of code are problematic, and GCC wouldn't issue this error in a case where there's no branching or other stuff to confuse the issue. If you can't rearrange it so that it's clear to GCC that it's set before used, whether you initialize it isn't going to make it significantly more unclear to readers.
