Fix several -Werror=unused-variable and -Werror=unused-but-set-variable and removed dead code found with this warnings
Showing the changes to codec/encoder/core/src/slice_multi_threading.cpp (1 of 10 files). Show all
Unified · Split
| @@ -353,7 +353,7 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 352 unmodified lines | |||
| 353 | MT_TRACE_LOG ((*ppCtx), WELS_LOG_INFO, "encpEncCtx= 0x%p\n", (void*) (*ppCtx)); | 353 | MT_TRACE_LOG ((*ppCtx), WELS_LOG_INFO, "encpEncCtx= 0x%p\n", (void*) (*ppCtx)); |
| 354 | 354 | ||
| 355 | char name[SEM_NAME_MAX] = {0}; | 355 | char name[SEM_NAME_MAX] = {0}; |
| 356 | WELS_THREAD_ERROR_CODE err = 0; | 356 | WELS_GCC_UNUSED WELS_THREAD_ERROR_CODE err = 0; |
| 357 | 357 | ||
| 358 | iIdx = 0; | 358 | iIdx = 0; |
| 359 | while (iIdx < iThreadNum) { | 359 | while (iIdx < iThreadNum) { |
| @@ -602,7 +602,6 @@ int32_t WriteSliceToFrameBs (sWelsEncCtx* pCtx, SLayerBSInfo* pLbi, uint8_t* pFr · 242 unmodified lines | |||
| 602 | SWelsSliceBs* pSliceBs = &pCtx->pSliceBs[iSliceIdx]; | 602 | SWelsSliceBs* pSliceBs = &pCtx->pSliceBs[iSliceIdx]; |
| 603 | SNalUnitHeaderExt* pNalHdrExt = &pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt; | 603 | SNalUnitHeaderExt* pNalHdrExt = &pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt; |
| 604 | uint8_t* pDst = pFrameBsBuffer; | 604 | uint8_t* pDst = pFrameBsBuffer; |
| 605 | int32_t pNalLen[2]; | ||
| 606 | const int32_t kiNalCnt = pSliceBs->iNalIndex; | 605 | const int32_t kiNalCnt = pSliceBs->iNalIndex; |
| 607 | int32_t iNalIdx = 0; | 606 | int32_t iNalIdx = 0; |
| 608 | int32_t iNalSize = 0; | 607 | int32_t iNalSize = 0; |
| @@ -616,7 +615,6 @@ int32_t WriteSliceToFrameBs (sWelsEncCtx* pCtx, SLayerBSInfo* pLbi, uint8_t* pFr · 7 unmodified lines | |||
| 616 | iNalSize = 0; | 615 | iNalSize = 0; |
| 617 | iReturn = WelsEncodeNal (&pSliceBs->sNalList[iNalIdx], pNalHdrExt, pCtx->iFrameBsSize-kiWrittenLength-iSliceSize, pDst, &iNalSize); | 616 | iReturn = WelsEncodeNal (&pSliceBs->sNalList[iNalIdx], pNalHdrExt, pCtx->iFrameBsSize-kiWrittenLength-iSliceSize, pDst, &iNalSize); |
| 618 | WELS_VERIFY_RETURN_IFNEQ(iReturn, ENC_RETURN_SUCCESS) | 617 | WELS_VERIFY_RETURN_IFNEQ(iReturn, ENC_RETURN_SUCCESS) |
| 619 | pNalLen[iNalIdx] = iNalSize; | ||
| 620 | iSliceSize += iNalSize; | 618 | iSliceSize += iNalSize; |
| 621 | pDst += iNalSize; | 619 | pDst += iNalSize; |
| 622 | pLbi->iNalLengthInByte[iNalBase + iNalIdx] = iNalSize; | 620 | pLbi->iNalLengthInByte[iNalBase + iNalIdx] = iNalSize; |