mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Fix some pedantic warnings when compiling with GCC.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
v0.11.12 - TBD
|
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.
|
* A safety change for custom VFS implementations. The `pBytesRead` parameter on the onRead callback is now pre-initialized to zero.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+11
@@ -3799,7 +3799,18 @@ typedef double ma_double;
|
|||||||
|
|
||||||
typedef void* ma_handle;
|
typedef void* ma_handle;
|
||||||
typedef void* ma_ptr;
|
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;
|
typedef void* ma_proc;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(_WCHAR_T_DEFINED)
|
#if defined(_MSC_VER) && !defined(_WCHAR_T_DEFINED)
|
||||||
typedef ma_uint16 wchar_t;
|
typedef ma_uint16 wchar_t;
|
||||||
|
|||||||
Reference in New Issue
Block a user