All: Correct more format strings on Windows (fixes #1817)

This commit is contained in:
Vicki Pfau 2020-07-11 15:34:45 -07:00
parent 145a31868a
commit 73c38b95b6
3 changed files with 9 additions and 0 deletions

View File

@ -29,6 +29,7 @@ Emulation fixes:
Other fixes: Other fixes:
- All: Improve export headers (fixes mgba.io/i/1738) - All: Improve export headers (fixes mgba.io/i/1738)
- All: Correct format strings for some numbers on Windows (fixes mgba.io/i/1794) - All: Correct format strings for some numbers on Windows (fixes mgba.io/i/1794)
- All: Correct more format strings on Windows (fixes mgba.io/i/1817)
- Core: Ensure ELF regions can be written before trying - Core: Ensure ELF regions can be written before trying
- Debugger: Don't skip undefined instructions when debugger attached - Debugger: Don't skip undefined instructions when debugger attached
- FFmpeg: Fix some small memory leaks - FFmpeg: Fix some small memory leaks

View File

@ -20,6 +20,10 @@ if(NOT MSVC)
set(CMAKE_C_EXTENSIONS ON) set(CMAKE_C_EXTENSIONS ON)
endif() endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-missing-field-initializers") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-missing-field-initializers")
if(WIN32)
# mingw32 likes to complain about using the "wrong" format strings despite them actually working
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format")
endif()
else() else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4003 /wd4244 /wd4146") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4003 /wd4244 /wd4146")
endif() endif()

View File

@ -14,6 +14,10 @@
#define CXX_GUARD_END #define CXX_GUARD_END
#endif #endif
#ifdef __MINGW32__
#define __USE_MINGW_ANSI_STDIO 1
#endif
CXX_GUARD_START CXX_GUARD_START
#include <ctype.h> #include <ctype.h>