Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
miniaudio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
miniaudio
Commits
c433e029
Commit
c433e029
authored
Apr 05, 2020
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compilation errors on GCC.
parent
31f49a7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
miniaudio.h
miniaudio.h
+10
-2
No files found.
miniaudio.h
View file @
c433e029
...
@@ -5481,6 +5481,7 @@ IMPLEMENTATION
...
@@ -5481,6 +5481,7 @@ IMPLEMENTATION
#include <limits.h> /* For INT_MAX */
#include <limits.h> /* For INT_MAX */
#include <math.h> /* sin(), etc. */
#include <math.h> /* sin(), etc. */
#include <stdarg.h>
#include <stdio.h>
#include <stdio.h>
#if !defined(_MSC_VER) && !defined(__DMC__)
#if !defined(_MSC_VER) && !defined(__DMC__)
#include <strings.h> /* For strcasecmp(). */
#include <strings.h> /* For strcasecmp(). */
...
@@ -7837,7 +7838,7 @@ static void ma_post_log_message(ma_context* pContext, ma_device* pDevice, ma_uin
...
@@ -7837,7 +7838,7 @@ static void ma_post_log_message(ma_context* pContext, ma_device* pDevice, ma_uin
/* Posts a formatted log message. */
/* Posts a formatted log message. */
static void ma_post_log_messagev(ma_context* pContext, ma_device* pDevice, ma_uint32 logLevel, const char* pFormat, va_list args)
static void ma_post_log_messagev(ma_context* pContext, ma_device* pDevice, ma_uint32 logLevel, const char* pFormat, va_list args)
{
{
#if
!defined(_MSC_VER) || _MSC_VER >= 1900
#if
(!defined(_MSC_VER) || _MSC_VER >= 1900) && !defined(__STRICT_ANSI__)
{
{
char pFormattedMessage[1024];
char pFormattedMessage[1024];
vsnprintf(pFormattedMessage, sizeof(pFormattedMessage), pFormat, args);
vsnprintf(pFormattedMessage, sizeof(pFormattedMessage), pFormat, args);
...
@@ -7884,12 +7885,19 @@ static void ma_post_log_messagev(ma_context* pContext, ma_device* pDevice, ma_ui
...
@@ -7884,12 +7885,19 @@ static void ma_post_log_messagev(ma_context* pContext, ma_device* pDevice, ma_ui
ma_free(pFormattedMessage, pAllocationCallbacks);
ma_free(pFormattedMessage, pAllocationCallbacks);
}
}
}
}
#else
/* Can't do anything because we don't have a safe way of to emulate vsnprintf() without a manual solution. */
(void)pContext;
(void)pDevice;
(void)logLevel;
(void)pFormat;
(void)args;
#endif
#endif
}
}
#endif
#endif
}
}
static void ma_post_log_messagef(ma_context* pContext, ma_device* pDevice, ma_uint32 logLevel, const char* pFormat, ...)
static
MA_INLINE
void ma_post_log_messagef(ma_context* pContext, ma_device* pDevice, ma_uint32 logLevel, const char* pFormat, ...)
{
{
va_list args;
va_list args;
va_start(args, pFormat);
va_start(args, pFormat);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment