From e29b30560ef053809da73fc34aed813267fbc6fb Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 17 Sep 2016 01:34:07 -0700 Subject: [PATCH] All: Disable missing-field-initializers warning --- CMakeLists.txt | 2 +- src/platform/3ds/main.c | 2 -- src/platform/psp2/main.c | 2 -- src/platform/wii/main.c | 2 -- src/util/gui.h | 4 +--- 5 files changed, 2 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 926087c45..b325e2b21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.6) project(mGBA C) set(BINARY_NAME mgba CACHE INTERNAL "Name of output binaries") if(NOT MSVC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=c99") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-missing-field-initializers -std=c99") else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4003 /wd4244 /wd4146") endif() diff --git a/src/platform/3ds/main.c b/src/platform/3ds/main.c index 30b4b7288..b2458b520 100644 --- a/src/platform/3ds/main.c +++ b/src/platform/3ds/main.c @@ -742,8 +742,6 @@ int main() { _pollInput, _pollCursor, _batteryState, _guiPrepare, _guiFinish, - - GUI_PARAMS_TRAIL }, .keySources = (struct GUIInputKeys[]) { { diff --git a/src/platform/psp2/main.c b/src/platform/psp2/main.c index 63ec5cc67..c184c419d 100644 --- a/src/platform/psp2/main.c +++ b/src/platform/psp2/main.c @@ -92,8 +92,6 @@ int main() { _pollInput, _pollCursor, _batteryState, 0, 0, - - GUI_PARAMS_TRAIL }, .configExtra = (struct GUIMenuItem[]) { { diff --git a/src/platform/wii/main.c b/src/platform/wii/main.c index 3077ef333..bcc9c8251 100644 --- a/src/platform/wii/main.c +++ b/src/platform/wii/main.c @@ -310,8 +310,6 @@ int main(int argc, char* argv[]) { _pollInput, _pollCursor, 0, _guiPrepare, 0, - - GUI_PARAMS_TRAIL }, .keySources = (struct GUIInputKeys[]) { { diff --git a/src/util/gui.h b/src/util/gui.h index ad02ab8b5..fe7d851a0 100644 --- a/src/util/gui.h +++ b/src/util/gui.h @@ -30,7 +30,7 @@ enum GUIInput { }; enum GUICursorState { - GUI_CURSOR_NOT_PRESENT, + GUI_CURSOR_NOT_PRESENT = 0, GUI_CURSOR_UP, GUI_CURSOR_DOWN, GUI_CURSOR_CLICKED, @@ -76,8 +76,6 @@ struct GUIParams { size_t fileIndex; }; -#define GUI_PARAMS_TRAIL {0}, {}, GUI_CURSOR_NOT_PRESENT, 0, 0, "", 0 - void GUIInit(struct GUIParams* params); void GUIPollInput(struct GUIParams* params, uint32_t* newInput, uint32_t* heldInput); enum GUICursorState GUIPollCursor(struct GUIParams* params, unsigned* x, unsigned* y);