mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Fix some strict C89 issues.
This commit is contained in:
+2
-4
@@ -8773,7 +8773,9 @@ MA_API ma_result ma_log_postv(ma_log* pLog, ma_uint32 level, const char* pFormat
|
||||
*/
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1200 /* 1200 = VC6 */
|
||||
{
|
||||
ma_result result;
|
||||
int formattedLen;
|
||||
char* pFormattedMessage = NULL;
|
||||
va_list args2;
|
||||
|
||||
#if _MSC_VER >= 1800
|
||||
@@ -8793,15 +8795,11 @@ MA_API ma_result ma_log_postv(ma_log* pLog, ma_uint32 level, const char* pFormat
|
||||
return MA_INVALID_OPERATION;
|
||||
}
|
||||
|
||||
char* pFormattedMessage = NULL;
|
||||
|
||||
pFormattedMessage = (char*)ma_malloc(formattedLen + 1, &pLog->allocationCallbacks);
|
||||
if (pFormattedMessage == NULL) {
|
||||
return MA_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
ma_result result;
|
||||
|
||||
/* We'll get errors on newer versions of Visual Studio if we try to use vsprintf(). */
|
||||
#if _MSC_VER >= 1400 /* 1400 = Visual Studio 2005 */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user