Mir

Code review comment for lp:~josharenson/mir/command_line_config

Revision history for this message
Josh Arenson (josharenson) wrote :

> 89 +int argc;
> 90 +char const** argv;
>
> I'm curious that these are now uninitialized when they were previously
> initialized with "safe" defaults. Was this intentional? And why?

Since this _should always_ be called from a command line application, and since a program cannot have more than one main function, argv will always be populated with _at least_ the executable name. I thought it might be confusing to initialize variables that are typically not initialized, however, there isn't any harm in initializing them as such:

132 -char const* dummy[] = {0};
133 -int argc = 0;
134 -char const** argv = dummy;

for safety's sake. Thoughts?

« Back to merge proposal