all repos — mgba @ c1261a5b7489c20ec5178012137f41df1fadc2ff

mGBA Game Boy Advance Emulator

GBA: Remove struct partial initialization for structs that are initialized later
Jeffrey Pfau jeffrey@endrift.com
Sun, 22 Feb 2015 02:42:08 -0800
commit

c1261a5b7489c20ec5178012137f41df1fadc2ff

parent

22f4b1fef9c8942d56658fd7353566b7f1c8a3fe

M src/platform/commandline.csrc/platform/commandline.c

@@ -60,6 +60,7 @@ #ifdef USE_GDB_STUB

"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);
M src/platform/perf-main.csrc/platform/perf-main.c

@@ -61,7 +61,7 @@ .idleOptimization = IDLE_LOOP_DETECT

}; GBAConfigLoadDefaults(&config, &opts); - struct GBAArguments args = {}; + struct GBAArguments args; if (!parseArguments(&args, &config, argc, argv, &subparser)) { usage(argv[0], PERF_USAGE); freeArguments(&args);
M src/platform/qt/GBAApp.cppsrc/platform/qt/GBAApp.cpp

@@ -31,7 +31,7 @@ #ifndef Q_OS_MAC

m_window.show(); #endif - GBAArguments args = {}; + GBAArguments args; if (m_configController.parseArguments(&args, argc, argv)) { m_window.argumentsPassed(&args); } else {
M src/platform/sdl/main.csrc/platform/sdl/main.c

@@ -52,8 +52,8 @@ .audioSync = true,

}; GBAConfigLoadDefaults(&config, &opts); - struct GBAArguments args = {}; - struct GraphicsOpts graphicsOpts = {}; + struct GBAArguments args; + struct GraphicsOpts graphicsOpts; struct SubParser subparser;