From b302bd5d288be2d3363b80053ca2392560b00b25 Mon Sep 17 00:00:00 2001 From: Ashok Bhat Date: Tue, 18 Feb 2014 11:40:00 +0000 Subject: LP64 fixes for media/libeffects Changes include: [x] In get parameter series of functions, replaced size_t* formal parameter type with uint32_t* where actual parameter passed was uint32_t*. [x] In set parameter series of functions, changed size_t formal parameter to uint32_t where actual parameter was uint32_t. [x] Changed the definition of LVM_UINT32 from unsigned long to uint32_t as unsigned long is 64-bit in LP64. [x] Used other stdint.h types for other LVM_types for consistency. [x] Use of uintptr_t for the pNextMember of the INST_ALLOC structure, rather than LVM_UINT32, for portablility. [x] Use of uintptr_t where pointers are used in arithmetic. [x] Replaced the use of 0xFFFFFFFC with ~3 in places where it was used to clear last two bits. [x] Removed int casts where cmdSize and *replySize, both uint32_t, were being compared with sizeof(). Change-Id: Ibec0b4d8e9b855f44b1cd853be6df84d13cf4186 Signed-off-by: Marcus Oakland Signed-off-by: Ashok Bhat --- media/libeffects/testlibs/EffectReverb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'media/libeffects/testlibs/EffectReverb.c') diff --git a/media/libeffects/testlibs/EffectReverb.c b/media/libeffects/testlibs/EffectReverb.c index c37f392..f056d19 100644 --- a/media/libeffects/testlibs/EffectReverb.c +++ b/media/libeffects/testlibs/EffectReverb.c @@ -750,7 +750,7 @@ void Reverb_Reset(reverb_object_t *pReverb, bool init) { * *---------------------------------------------------------------------------- */ -int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, +int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, uint32_t *pSize, void *pValue) { int32_t *pValue32; int16_t *pValue16; @@ -758,7 +758,7 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, int32_t i; int32_t temp; int32_t temp2; - size_t size; + uint32_t size; if (pReverb->m_Preset) { if (param != REVERB_PARAM_PRESET || *pSize < sizeof(int16_t)) { @@ -1033,7 +1033,7 @@ int Reverb_getParameter(reverb_object_t *pReverb, int32_t param, size_t *pSize, * *---------------------------------------------------------------------------- */ -int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, +int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, uint32_t size, void *pValue) { int32_t value32; int16_t value16; @@ -1044,7 +1044,7 @@ int Reverb_setParameter(reverb_object_t *pReverb, int32_t param, size_t size, reverb_preset_t *pPreset; int maxSamples; int32_t averageDelay; - size_t paramSize; + uint32_t paramSize; ALOGV("Reverb_setParameter, context %p, param %d, value16 %d, value32 %d", pReverb, param, *(int16_t *)pValue, *(int32_t *)pValue); -- cgit v1.1