Commit 58855d3d authored by David Reid's avatar David Reid

Fix some pedantic warnings when compiling with GCC.

parent 315087be
v0.11.12 - TBD
=====================
* Fix some pedantic warnings when compiling with GCC.
* A safety change for custom VFS implementations. The `pBytesRead` parameter on the onRead callback is now pre-initialized to zero.
......
......@@ -3799,7 +3799,18 @@ typedef double ma_double;
typedef void* ma_handle;
typedef void* ma_ptr;
/*
ma_proc is annoying because when compiling with GCC we get pendantic warnings about converting
between `void*` and `void (*)()`. We can't use `void (*)()` with MSVC however, because we'll get
warning C4191 about "type cast between incompatible function types". To work around this I'm going
to use a different data type depending on the compiler.
*/
#if defined(__GNUC__)
typedef void (*ma_proc)(void);
#else
typedef void* ma_proc;
#endif
#if defined(_MSC_VER) && !defined(_WCHAR_T_DEFINED)
typedef ma_uint16 wchar_t;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment