From 9171338cb8aad06ebf70f18be641c6d3a2780738 Mon Sep 17 00:00:00 2001 From: Amit Shekhar Date: Wed, 17 Jan 2018 16:43:26 -0800 Subject: mm-core: Fix compilation errors due to compiler upgrade Fix compilation errors due to compiler upgrade Change-Id: Ief277fb251d2ac2ffcd2784b3eece0544f42edee --- mm-core/inc/qc_omx_msg.h | 11 +++++++---- mm-core/src/common/qc_omx_core.c | 39 +-------------------------------------- 2 files changed, 8 insertions(+), 42 deletions(-) (limited to 'mm-core') diff --git a/mm-core/inc/qc_omx_msg.h b/mm-core/inc/qc_omx_msg.h index deb0ab79..e0c85929 100644 --- a/mm-core/inc/qc_omx_msg.h +++ b/mm-core/inc/qc_omx_msg.h @@ -1,5 +1,5 @@ /*-------------------------------------------------------------------------- -Copyright (c) 2009, The Linux Foundation. All rights reserved. +Copyright (c) 2009, 2018 The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -78,9 +78,12 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define DEBUG_DETAIL printf #endif // _ANDROID_ #else - #define DEBUG_PRINT_ERROR - #define DEBUG_PRINT - #define DEBUG_DETAIL + #ifdef _ANDROID_ + #include + #define DEBUG_PRINT_ERROR ALOGV + #define DEBUG_PRINT ALOGV + #define DEBUG_DETAIL ALOGV + #endif // _ANDROID_ #endif // _ENABLE_QC_MSG_LOG_ #endif // _QC_OMX_MSG_H_ diff --git a/mm-core/src/common/qc_omx_core.c b/mm-core/src/common/qc_omx_core.c index c7e3fadb..69b3cc23 100644 --- a/mm-core/src/common/qc_omx_core.c +++ b/mm-core/src/common/qc_omx_core.c @@ -1,5 +1,5 @@ /*-------------------------------------------------------------------------- -Copyright (c) 2009, 2015, The Linux Foundation. All rights reserved. +Copyright (c) 2009, 2015, 2018 The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -289,42 +289,6 @@ static int check_lib_unload(int index) } return rc; } -/* ====================================================================== -FUNCTION - is_cmp_already_exists - -DESCRIPTION - Check if the component already exists or not. Used in the - management of component handles. - -PARAMETERS - None - -RETURN VALUE - Error None. -========================================================================== */ -static int is_cmp_already_exists(char *cmp_name) -{ - unsigned i =0,j=0; - int rc = -1; - for(i=0; i< SIZE_OF_CORE; i++) - { - if(!strcmp(cmp_name, core[i].name)) - { - for(j=0; j< OMX_COMP_MAX_INST; j++) - { - if(core[i].inst[j]) - { - rc = i; - DEBUG_PRINT("Component exists %d\n", rc); - return rc; - } - } - break; - } - } - return rc; -} /* ====================================================================== FUNCTION @@ -412,7 +376,6 @@ OMX_GetHandle(OMX_OUT OMX_HANDLETYPE* handle, pthread_mutex_lock(&lock_core); if(handle) { - struct stat sd; *handle = NULL; char optComponentName[OMX_MAX_STRINGNAME_SIZE]; strlcpy(optComponentName, componentName, OMX_MAX_STRINGNAME_SIZE); -- cgit v1.2.3