Remove build warnings and fixed svace issues
[platform/adaptation/ap_samsung/libomxil-e3250-v4l2.git] / openmax / component / audio / dec / Exynos_OMX_Adec.c
index 734d16a..0de66dc 100755 (executable)
@@ -241,8 +241,6 @@ OMX_ERRORTYPE Exynos_OMX_FreeBuffer(
     OMX_COMPONENTTYPE        *pOMXComponent = NULL;
     EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
     EXYNOS_OMX_BASEPORT      *pExynosPort = NULL;
-    OMX_BUFFERHEADERTYPE     *temp_bufferHeader = NULL;
-    OMX_U8                   *temp_buffer = NULL;
     OMX_U32                   i = 0;
 
     FunctionIn();
@@ -318,29 +316,12 @@ EXIT:
 
 OMX_ERRORTYPE Exynos_OMX_AllocateTunnelBuffer(EXYNOS_OMX_BASEPORT *pOMXBasePort, OMX_U32 nPortIndex)
 {
-    OMX_ERRORTYPE                 ret = OMX_ErrorNone;
-    EXYNOS_OMX_BASEPORT          *pExynosPort = NULL;
-    OMX_BUFFERHEADERTYPE         *temp_bufferHeader = NULL;
-    OMX_U8                       *temp_buffer = NULL;
-    OMX_U32                       bufferSize = 0;
-    OMX_PARAM_PORTDEFINITIONTYPE  portDefinition;
-
-    ret = OMX_ErrorTunnelingUnsupported;
-EXIT:
-    return ret;
+    return OMX_ErrorTunnelingUnsupported;
 }
 
 OMX_ERRORTYPE Exynos_OMX_FreeTunnelBuffer(EXYNOS_OMX_BASEPORT *pOMXBasePort, OMX_U32 nPortIndex)
 {
-    OMX_ERRORTYPE ret = OMX_ErrorNone;
-    EXYNOS_OMX_BASEPORT* pExynosPort = NULL;
-    OMX_BUFFERHEADERTYPE* temp_bufferHeader = NULL;
-    OMX_U8 *temp_buffer = NULL;
-    OMX_U32 bufferSize = 0;
-
-    ret = OMX_ErrorTunnelingUnsupported;
-EXIT:
-    return ret;
+    return OMX_ErrorTunnelingUnsupported;
 }
 
 OMX_ERRORTYPE Exynos_OMX_ComponentTunnelRequest(
@@ -350,11 +331,7 @@ OMX_ERRORTYPE Exynos_OMX_ComponentTunnelRequest(
     OMX_IN OMX_U32        nTunneledPort,
     OMX_INOUT OMX_TUNNELSETUPTYPE *pTunnelSetup)
 {
-    OMX_ERRORTYPE ret = OMX_ErrorNone;
-
-    ret = OMX_ErrorTunnelingUnsupported;
-EXIT:
-    return ret;
+    return OMX_ErrorTunnelingUnsupported;
 }
 
 OMX_BOOL Exynos_Check_BufferProcess_State(EXYNOS_OMX_BASECOMPONENT *pExynosComponent)
@@ -419,7 +396,6 @@ OMX_ERRORTYPE Exynos_InputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent)
     dataBuffer->nFlags        = 0;
     dataBuffer->timeStamp     = 0;
 
-EXIT:
     FunctionOut();
 
     return ret;
@@ -526,7 +502,6 @@ OMX_ERRORTYPE Exynos_OutputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent)
     dataBuffer->nFlags        = 0;
     dataBuffer->timeStamp     = 0;
 
-EXIT:
     FunctionOut();
 
     return ret;
@@ -770,7 +745,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess(OMX_HANDLETYPE hComponent)
     EXYNOS_OMX_DATABUFFER    *outputUseBuffer = &exynosOutputPort->way.port1WayDataBuffer.dataBuffer;
     EXYNOS_OMX_DATA          *inputData = &exynosInputPort->processData;
     EXYNOS_OMX_DATA          *outputData = &exynosOutputPort->processData;
-    OMX_U32                   copySize = 0;
 
     pExynosComponent->reInputData = OMX_FALSE;
 
@@ -824,7 +798,7 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess(OMX_HANDLETYPE hComponent)
             Exynos_OSAL_MutexUnlock(outputUseBuffer->bufferMutex);
             Exynos_OSAL_MutexUnlock(inputUseBuffer->bufferMutex);
 
-            if (ret == OMX_ErrorInputDataDecodeYet)
+            if (ret == (OMX_ERRORTYPE)OMX_ErrorInputDataDecodeYet)
                 pExynosComponent->reInputData = OMX_TRUE;
             else
                 pExynosComponent->reInputData = OMX_FALSE;
@@ -835,8 +809,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess(OMX_HANDLETYPE hComponent)
         }
     }
 
-EXIT:
-
     FunctionOut();
 
     return ret;
@@ -870,7 +842,6 @@ OMX_ERRORTYPE Exynos_OMX_FlushPort(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 por
     EXYNOS_OMX_DATABUFFER    *flushPortBuffer = NULL;
     OMX_BUFFERHEADERTYPE     *bufferHeader = NULL;
     EXYNOS_OMX_MESSAGE       *message = NULL;
-    OMX_U32                   flushNum = 0;
     OMX_S32                   semValue = 0;
 
     FunctionIn();
@@ -926,7 +897,6 @@ OMX_ERRORTYPE Exynos_OMX_FlushPort(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 por
     pExynosPort->processData.timeStamp     = 0;
     pExynosPort->processData.usedDataLen   = 0;
 
-EXIT:
     FunctionOut();
 
     return ret;
@@ -936,10 +906,8 @@ OMX_ERRORTYPE Exynos_OMX_BufferFlush(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 n
 {
     OMX_ERRORTYPE                  ret = OMX_ErrorNone;
     EXYNOS_OMX_BASECOMPONENT      *pExynosComponent = NULL;
-    EXYNOS_OMX_AUDIODEC_COMPONENT *pAudioDec = NULL;
     EXYNOS_OMX_BASEPORT           *pExynosPort = NULL;
     EXYNOS_OMX_DATABUFFER         *flushPortBuffer = NULL;
-    OMX_U32                        i = 0, cnt = 0;
 
     FunctionIn();
 #ifdef TIZEN_FEATURE_E3250
@@ -960,7 +928,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferFlush(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 n
         goto EXIT;
     }
     pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
-    pAudioDec = (EXYNOS_OMX_AUDIODEC_COMPONENT *)pExynosComponent->hComponentHandle;
 
     Exynos_OSAL_SignalSet(pExynosComponent->pauseEvent);
 
@@ -1014,7 +981,6 @@ OMX_ERRORTYPE Exynos_OMX_AudioDecodeGetParameter(
     OMX_ERRORTYPE             ret = OMX_ErrorNone;
     OMX_COMPONENTTYPE        *pOMXComponent = NULL;
     EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
-    EXYNOS_OMX_BASEPORT      *pExynosPort = NULL;
 
     FunctionIn();
 
@@ -1124,7 +1090,6 @@ OMX_ERRORTYPE Exynos_OMX_AudioDecodeSetParameter(
     OMX_ERRORTYPE             ret = OMX_ErrorNone;
     OMX_COMPONENTTYPE        *pOMXComponent = NULL;
     EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
-    EXYNOS_OMX_BASEPORT      *pExynosPort = NULL;
 
     FunctionIn();
 
@@ -1159,10 +1124,8 @@ OMX_ERRORTYPE Exynos_OMX_AudioDecodeSetParameter(
     {
         OMX_AUDIO_PARAM_PORTFORMATTYPE *portFormat = (OMX_AUDIO_PARAM_PORTFORMATTYPE *)ComponentParameterStructure;
         OMX_U32                         portIndex = portFormat->nPortIndex;
-        OMX_U32                         index    = portFormat->nIndex;
         EXYNOS_OMX_BASEPORT            *pExynosPort = NULL;
         OMX_PARAM_PORTDEFINITIONTYPE   *portDefinition = NULL;
-        OMX_U32                         supportFormatNum = 0; /* supportFormatNum = N-1 */
 
         ret = Exynos_OMX_Check_SizeVersion(portFormat, sizeof(OMX_AUDIO_PARAM_PORTFORMATTYPE));
         if (ret != OMX_ErrorNone) {
@@ -1350,8 +1313,6 @@ static OMX_ERRORTYPE Exynos_OMX_BufferProcessThread(OMX_PTR threadData)
 {
     OMX_ERRORTYPE          ret = OMX_ErrorNone;
     OMX_COMPONENTTYPE     *pOMXComponent = NULL;
-    EXYNOS_OMX_BASECOMPONENT *pSECComponent = NULL;
-    EXYNOS_OMX_MESSAGE       *message = NULL;
 
     FunctionIn();
 
@@ -1364,7 +1325,6 @@ static OMX_ERRORTYPE Exynos_OMX_BufferProcessThread(OMX_PTR threadData)
     if (ret != OMX_ErrorNone) {
         goto EXIT;
     }
-    pSECComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
     Exynos_OMX_BufferProcess(pOMXComponent);
 
     Exynos_OSAL_ThreadExit(NULL);
@@ -1390,7 +1350,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess_Create(OMX_HANDLETYPE hComponent)
                  Exynos_OMX_BufferProcessThread,
                  pOMXComponent);
 
-EXIT:
     FunctionOut();
 
     return ret;
@@ -1419,7 +1378,6 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess_Terminate(OMX_HANDLETYPE hComponent)
     Exynos_OSAL_ThreadTerminate(pAudioDec->hBufferProcessThread);
     pAudioDec->hBufferProcessThread = NULL;
 
-EXIT:
     FunctionOut();
 
     return ret;