aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alBuffer.c4
-rw-r--r--OpenAL32/alError.c4
-rw-r--r--OpenAL32/alState.c3
3 files changed, 6 insertions, 5 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index 1464ef74..a8ad855f 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -1252,15 +1252,15 @@ static ALbuffer *AllocBuffer(ALCcontext *context)
if(UNLIKELY(!buffer))
{
const BufferSubList empty_sublist = { 0, NULL };
- lidx = VECTOR_SIZE(device->BufferList);
/* Don't allocate so many list entries that the 32-bit ID could
* overflow...
*/
- if(UNLIKELY(lidx >= 1<<25))
+ if(UNLIKELY(VECTOR_SIZE(device->BufferList) >= 1<<25))
{
almtx_unlock(&device->BufferLock);
return NULL;
}
+ lidx = (ALsizei)VECTOR_SIZE(device->BufferList);
VECTOR_PUSH_BACK(device->BufferList, empty_sublist);
sublist = &VECTOR_BACK(device->BufferList);
sublist->FreeMask = ~U64(0);
diff --git a/OpenAL32/alError.c b/OpenAL32/alError.c
index fe0e02be..e3909742 100644
--- a/OpenAL32/alError.c
+++ b/OpenAL32/alError.c
@@ -48,14 +48,14 @@ void alSetError(ALCcontext *context, ALenum errorCode, const char *msg, ...)
if(msglen < 0 || (size_t)msglen >= sizeof(message))
{
message[sizeof(message)-1] = 0;
- msglen = strlen(message);
+ msglen = (int)strlen(message);
}
if(msglen > 0)
msg = message;
else
{
msg = "<internal error constructing message>";
- msglen = strlen(msg);
+ msglen = (int)strlen(msg);
}
WARN("Error generated on context %p, code 0x%04x, \"%s\"\n",
diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c
index 2637aacd..d436e7a7 100644
--- a/OpenAL32/alState.c
+++ b/OpenAL32/alState.c
@@ -720,9 +720,10 @@ AL_API ALvoid AL_APIENTRY alDopplerVelocity(ALfloat value)
{
static const ALCchar msg[] =
"alDopplerVelocity is deprecated in AL1.1, use alSpeedOfSound";
+ const ALsizei msglen = (ALsizei)strlen(msg);
almtx_lock(&context->EventLock);
if((context->EnabledEvts&EventType_Deprecated) && context->EventCb)
- (*context->EventCb)(AL_EVENT_TYPE_DEPRECATED_SOFT, 0, 0, strlen(msg), msg,
+ (*context->EventCb)(AL_EVENT_TYPE_DEPRECATED_SOFT, 0, 0, msglen, msg,
context->EventParam);
almtx_unlock(&context->EventLock);
}