mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 08:14:04 +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
|
||||
|
||||
#ifndef MA_ZERO_MEMORY
|
||||
static MA_INLINE void ma_zero_memory(void* p, size_t sz)
|
||||
{
|
||||
#ifdef MA_WIN32
|
||||
#define MA_ZERO_MEMORY(p, sz) ZeroMemory((p), (sz))
|
||||
ZeroMemory(p, sz);
|
||||
#else
|
||||
#define MA_ZERO_MEMORY(p, sz) memset((p), 0, (sz))
|
||||
if (sz > 0) {
|
||||
memset(p, 0, sz);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef MA_ZERO_MEMORY
|
||||
#define MA_ZERO_MEMORY(p, sz) ma_zero_memory((p), (sz))
|
||||
#endif
|
||||
|
||||
#ifndef MA_COPY_MEMORY
|
||||
|
||||
Reference in New Issue
Block a user