mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 16:54:03 +02:00
Fix some sanitization warnings.
Public issue https://github.com/mackron/miniaudio/issues/550
This commit is contained in:
+10
-3
@@ -11881,12 +11881,19 @@ Standard Library Stuff
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MA_ZERO_MEMORY
|
static MA_INLINE void ma_zero_memory(void* p, size_t sz)
|
||||||
|
{
|
||||||
#ifdef MA_WIN32
|
#ifdef MA_WIN32
|
||||||
#define MA_ZERO_MEMORY(p, sz) ZeroMemory((p), (sz))
|
ZeroMemory(p, sz);
|
||||||
#else
|
#else
|
||||||
#define MA_ZERO_MEMORY(p, sz) memset((p), 0, (sz))
|
if (sz > 0) {
|
||||||
|
memset(p, 0, sz);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef MA_ZERO_MEMORY
|
||||||
|
#define MA_ZERO_MEMORY(p, sz) ma_zero_memory((p), (sz))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MA_COPY_MEMORY
|
#ifndef MA_COPY_MEMORY
|
||||||
|
|||||||
Reference in New Issue
Block a user