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/preprocessing/PreProcessing.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'media/libeffects/preprocessing') diff --git a/media/libeffects/preprocessing/PreProcessing.cpp b/media/libeffects/preprocessing/PreProcessing.cpp index c56ff72..a96a703 100644 --- a/media/libeffects/preprocessing/PreProcessing.cpp +++ b/media/libeffects/preprocessing/PreProcessing.cpp @@ -77,7 +77,7 @@ struct preproc_ops_s { void (* enable)(preproc_effect_t *fx); void (* disable)(preproc_effect_t *fx); int (* set_parameter)(preproc_effect_t *fx, void *param, void *value); - int (* get_parameter)(preproc_effect_t *fx, void *param, size_t *size, void *value); + int (* get_parameter)(preproc_effect_t *fx, void *param, uint32_t *size, void *value); int (* set_device)(preproc_effect_t *fx, uint32_t device); }; @@ -291,7 +291,7 @@ int AgcCreate(preproc_effect_t *effect) int AgcGetParameter(preproc_effect_t *effect, void *pParam, - size_t *pValueSize, + uint32_t *pValueSize, void *pValue) { int status = 0; @@ -452,9 +452,9 @@ int AecCreate(preproc_effect_t *effect) return 0; } -int AecGetParameter(preproc_effect_t *effect, +int AecGetParameter(preproc_effect_t *effect, void *pParam, - size_t *pValueSize, + uint32_t *pValueSize, void *pValue) { int status = 0; @@ -575,9 +575,9 @@ int NsCreate(preproc_effect_t *effect) return 0; } -int NsGetParameter(preproc_effect_t *effect, +int NsGetParameter(preproc_effect_t *effect, void *pParam, - size_t *pValueSize, + uint32_t *pValueSize, void *pValue) { int status = 0; @@ -1453,7 +1453,7 @@ int PreProcessingFx_Command(effect_handle_t self, if (effect->ops->get_parameter) { p->status = effect->ops->get_parameter(effect, p->data, - (size_t *)&p->vsize, + &p->vsize, p->data + voffset); *replySize = sizeof(effect_param_t) + voffset + p->vsize; } -- cgit v1.1