Merge pull request #13041 from hugueskamba/hk_remove_cordio_warnings

Cordio: put parentheses to correct order of precedence in ternary expressions
pull/13077/head
Martin Kojtal 2020-06-05 10:47:36 +02:00 committed by GitHub
commit 35a0e5d4f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -452,7 +452,7 @@ static inline void lctrMstComputeAuxOffset(lctrAuxPtr_t *pAuxPtr, uint32_t *pOff
{
uint32_t offsetUsec = pAuxPtr->auxOffset * ((pAuxPtr->offsetUnits == LCTR_OFFS_UNITS_30_USEC) ? 30 : 300);
uint32_t caPpm = BbGetClockAccuracy() + ((pAuxPtr->ca == LCTR_CLK_ACC_0_50_PPM) ? 50 : 500);
uint32_t wwUsec = lctrCalcWindowWideningUsec((offsetUsec + (pAuxPtr->offsetUnits == LCTR_OFFS_UNITS_30_USEC) ? 30 : 300), caPpm);
uint32_t wwUsec = lctrCalcWindowWideningUsec(offsetUsec + ((pAuxPtr->offsetUnits == LCTR_OFFS_UNITS_30_USEC) ? 30 : 300), caPpm);
*pOffsetUsec = offsetUsec - wwUsec;
*pSyncDelayUsec = (wwUsec << 1) + ((pAuxPtr->offsetUnits == LCTR_OFFS_UNITS_30_USEC) ? 30 : 300); /* rounding compensation */

View File

@ -452,7 +452,7 @@ void lctrSlvConnEndOp(BbOpDesc_t *pOp)
(WsfQueueEmpty(&pCtx->txArqQ)) &&
(pCtx->state != LCTR_CONN_STATE_TERMINATING)))
{
if ((pCtx->llcpActiveProc == LCTR_PROC_INVALID))
if (pCtx->llcpActiveProc == LCTR_PROC_INVALID)
{
numSkipCe = pCtx->maxLatency;
}

View File

@ -1285,7 +1285,7 @@ void lctrMstPerScanOpCommit(lctrExtScanCtx_t *pExtScanCtx, lctrAuxPtr_t *pAuxPtr
pPerScanCtx->lastAnchorPoint = startTs + BB_US_TO_BB_TICKS(offsetUsec);
pPerScanCtx->lastActiveEvent = pPerScanCtx->eventCounter;
uint32_t caPpm = lctrCalcTotalAccuracy(pSyncInfo->sca);
uint32_t wwUsec = lctrCalcWindowWideningUsec((offsetUsec + (pSyncInfo->offsetUnits == LCTR_OFFS_UNITS_30_USEC) ? 30 : 300), caPpm);
uint32_t wwUsec = lctrCalcWindowWideningUsec(offsetUsec + ((pSyncInfo->offsetUnits == LCTR_OFFS_UNITS_30_USEC) ? 30 : 300), caPpm);
syncOffsetUsec = offsetUsec - wwUsec;
pPerScanCtx->rxSyncDelayUsec = pBle->op.mstPerScan.rxSyncDelayUsec = (wwUsec << 1) + ((pSyncInfo->offsetUnits == LCTR_OFFS_UNITS_30_USEC) ? 30 : 300); /* rounding compensation */
int16_t dueOffsetUsec = (offsetUsec - wwUsec) - BB_TICKS_TO_US(BB_US_TO_BB_TICKS(offsetUsec) - BB_US_TO_BB_TICKS(wwUsec));