GBA: Remove struct partial initialization for structs that are initialized later

This commit is contained in:
Jeffrey Pfau 2015-02-22 02:42:08 -08:00
parent 22f4b1fef9
commit c1261a5b74
4 changed files with 5 additions and 4 deletions

View File

@ -60,6 +60,7 @@ bool parseArguments(struct GBAArguments* opts, struct GBAConfig* config, int arg
"g"
#endif
;
memset(opts, 0, sizeof(*opts));
if (subparser && subparser->extraOptions) {
// TODO: modularize options to subparsers
strncat(options, subparser->extraOptions, sizeof(options) - strlen(options) - 1);

View File

@ -61,7 +61,7 @@ int main(int argc, char** argv) {
};
GBAConfigLoadDefaults(&config, &opts);
struct GBAArguments args = {};
struct GBAArguments args;
if (!parseArguments(&args, &config, argc, argv, &subparser)) {
usage(argv[0], PERF_USAGE);
freeArguments(&args);

View File

@ -31,7 +31,7 @@ GBAApp::GBAApp(int& argc, char* argv[])
m_window.show();
#endif
GBAArguments args = {};
GBAArguments args;
if (m_configController.parseArguments(&args, argc, argv)) {
m_window.argumentsPassed(&args);
} else {

View File

@ -52,8 +52,8 @@ int main(int argc, char** argv) {
};
GBAConfigLoadDefaults(&config, &opts);
struct GBAArguments args = {};
struct GraphicsOpts graphicsOpts = {};
struct GBAArguments args;
struct GraphicsOpts graphicsOpts;
struct SubParser subparser;