From c858ef1569e504c088b9e58f8b7aec37328fc91f Mon Sep 17 00:00:00 2001 From: David Reid Date: Thu, 26 Mar 2020 20:26:57 +1000 Subject: [PATCH] Fix a warning in ma_wfopen(). --- miniaudio.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index 79a7f84e..84b3d173 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -6853,13 +6853,9 @@ MA_API ma_result ma_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_ #if defined(MA_HAS_WFOPEN) { - errno_t err; - - (void)pAllocationCallbacks; - - /* Use _wfopen() on Windows. */ + /* Use _wfopen() on Windows. */ #if defined(_MSC_VER) && _MSC_VER >= 1400 - err = _wfopen_s(ppFile, pFilePath, pOpenMode); + errno_t err = _wfopen_s(ppFile, pFilePath, pOpenMode); if (err != 0) { return ma_result_from_errno(err); } @@ -6869,6 +6865,7 @@ MA_API ma_result ma_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_ return ma_result_from_errno(errno); } #endif + (void)pAllocationCallbacks; } #else /*