
Charles Duffy wrote:
Chris Lalancette wrote:
No, you are right. This was part of the refactoring, and I just didn't re-read the code. I would prefer to move prog to the top of the block myself, and add args there; it just seems tidier.
I agree that it's tidier -- but looking at things in context, I'm not very comfortable putting the declarations at the very top of the function. Part of the reason is that everything else there is initialized, even if only to NULL; I hate to break such a convention, but at the same time, I find it dangerous to suppress any warnings the compiler might otherwise be able to generate should a codepath allow a variable be used uninitialized.
Does the below (creating a new code block and declaring both variables there) work for everyone?
ACK -- Chris Lalancette