FUTURE_SEQUANA: Clean up "unused variable" compiler warnings

Clean up compiler warnings coming from PDL read-out of peripheral
interrupt status registers.
pull/10419/head
Leszek Rusinowicz 2019-04-16 16:59:53 +02:00
parent ffe9ddfb2d
commit ab8b573138
7 changed files with 17 additions and 0 deletions

View File

@ -928,6 +928,7 @@ __STATIC_INLINE void Cy_CTDAC_ClearInterrupt(CTDAC_Type *base)
/* Dummy read for buffered writes. */ /* Dummy read for buffered writes. */
unused = base->INTR; unused = base->INTR;
(void)unused;
} }
/******************************************************************************* /*******************************************************************************

View File

@ -1577,6 +1577,7 @@ __STATIC_INLINE void Cy_GPIO_ClearInterrupt(GPIO_PRT_Type* base, uint32_t pinNum
/* This read ensures that the initial write has been flushed out to the hardware */ /* This read ensures that the initial write has been flushed out to the hardware */
unused = base->INTR; unused = base->INTR;
(void)unused;
} }

View File

@ -622,6 +622,7 @@ __STATIC_INLINE void Cy_IPC_Drv_ClearInterrupt(IPC_INTR_STRUCT_Type* base, uint
base->INTR = _VAL2FLD(IPC_INTR_STRUCT_INTR_NOTIFY, ipcNotifyMask) | base->INTR = _VAL2FLD(IPC_INTR_STRUCT_INTR_NOTIFY, ipcNotifyMask) |
_VAL2FLD(IPC_INTR_STRUCT_INTR_RELEASE, ipcReleaseMask); _VAL2FLD(IPC_INTR_STRUCT_INTR_RELEASE, ipcReleaseMask);
unused = base->INTR; /* Read the register to flush the cache */ unused = base->INTR; /* Read the register to flush the cache */
(void)unused;
} }
/** \} group_ipc_functions */ /** \} group_ipc_functions */

View File

@ -1564,6 +1564,7 @@ __STATIC_INLINE void Cy_SAR_ClearInterrupt(SAR_Type *base, uint32_t intrMask)
/* Dummy read for buffered writes. */ /* Dummy read for buffered writes. */
unused = base->INTR; unused = base->INTR;
(void)unused;
} }
/******************************************************************************* /*******************************************************************************
@ -1720,6 +1721,7 @@ __STATIC_INLINE void Cy_SAR_ClearRangeInterrupt(SAR_Type *base, uint32_t chanMas
/* Dummy read for buffered writes. */ /* Dummy read for buffered writes. */
unused = base->RANGE_INTR; unused = base->RANGE_INTR;
(void)unused;
} }
/******************************************************************************* /*******************************************************************************
@ -1863,6 +1865,7 @@ __STATIC_INLINE void Cy_SAR_ClearSatInterrupt(SAR_Type *base, uint32_t chanMask)
/* Dummy read for buffered writes. */ /* Dummy read for buffered writes. */
unused = base->SATURATE_INTR; unused = base->SATURATE_INTR;
(void)unused;
} }
/******************************************************************************* /*******************************************************************************

View File

@ -666,6 +666,7 @@ __STATIC_INLINE void Cy_SCB_ClearRxFifo(CySCB_Type* base)
base->RX_FIFO_CTRL &= (uint32_t) ~SCB_RX_FIFO_CTRL_CLEAR_Msk; base->RX_FIFO_CTRL &= (uint32_t) ~SCB_RX_FIFO_CTRL_CLEAR_Msk;
unused = base->RX_FIFO_CTRL; unused = base->RX_FIFO_CTRL;
(void)unused;
} }
@ -793,6 +794,7 @@ __STATIC_INLINE void Cy_SCB_ClearTxFifo(CySCB_Type *base)
base->TX_FIFO_CTRL &= (uint32_t) ~SCB_TX_FIFO_CTRL_CLEAR_Msk; base->TX_FIFO_CTRL &= (uint32_t) ~SCB_TX_FIFO_CTRL_CLEAR_Msk;
unused = base->TX_FIFO_CTRL; unused = base->TX_FIFO_CTRL;
(void)unused;
} }
@ -968,6 +970,7 @@ __STATIC_INLINE void Cy_SCB_ClearRxInterrupt(CySCB_Type *base, uint32_t interrup
base->INTR_RX = interruptMask; base->INTR_RX = interruptMask;
unused = base->INTR_RX; unused = base->INTR_RX;
(void)unused;
} }
@ -1116,6 +1119,7 @@ __STATIC_INLINE void Cy_SCB_ClearTxInterrupt(CySCB_Type *base, uint32_t interrup
base->INTR_TX = interruptMask; base->INTR_TX = interruptMask;
unused = base->INTR_TX; unused = base->INTR_TX;
(void)unused;
} }
@ -1255,6 +1259,7 @@ __STATIC_INLINE void Cy_SCB_ClearMasterInterrupt(CySCB_Type *base, uint32_t inte
base->INTR_M = interruptMask; base->INTR_M = interruptMask;
unused = base->INTR_M; unused = base->INTR_M;
(void)unused;
} }
@ -1396,6 +1401,7 @@ __STATIC_INLINE void Cy_SCB_ClearSlaveInterrupt(CySCB_Type *base, uint32_t inter
base->INTR_S = interruptMask; base->INTR_S = interruptMask;
unused = base->INTR_S; unused = base->INTR_S;
(void)unused;
} }
@ -1534,6 +1540,7 @@ __STATIC_INLINE void Cy_SCB_ClearI2CInterrupt(CySCB_Type *base, uint32_t interru
base->INTR_I2C_EC = interruptMask; base->INTR_I2C_EC = interruptMask;
unused = base->INTR_I2C_EC; unused = base->INTR_I2C_EC;
(void)unused;
} }
@ -1649,6 +1656,7 @@ __STATIC_INLINE void Cy_SCB_ClearSpiInterrupt(CySCB_Type *base, uint32_t interru
base->INTR_SPI_EC = interruptMask; base->INTR_SPI_EC = interruptMask;
unused = base->INTR_SPI_EC; unused = base->INTR_SPI_EC;
(void)unused;
} }
/** \cond INTERNAL */ /** \cond INTERNAL */
@ -1734,6 +1742,7 @@ __STATIC_INLINE void Cy_SCB_FwBlockReset(CySCB_Type *base)
base->CTRL |= (uint32_t) SCB_CTRL_ENABLED_Msk; base->CTRL |= (uint32_t) SCB_CTRL_ENABLED_Msk;
unused = base->CTRL; unused = base->CTRL;
(void)unused;
} }

View File

@ -2085,6 +2085,7 @@ __STATIC_INLINE cy_en_sysclk_status_t
_VAL2FLD(PERI_DIV_CMD_TYPE_SEL, dividerType) | _VAL2FLD(PERI_DIV_CMD_TYPE_SEL, dividerType) |
_VAL2FLD(PERI_DIV_CMD_DIV_SEL, dividerNum); _VAL2FLD(PERI_DIV_CMD_DIV_SEL, dividerNum);
unused = PERI->DIV_CMD; /* dummy read to handle buffered writes */ unused = PERI->DIV_CMD; /* dummy read to handle buffered writes */
(void)unused;
retval = CY_SYSCLK_SUCCESS; retval = CY_SYSCLK_SUCCESS;
} }
} }

View File

@ -539,6 +539,7 @@ __STATIC_INLINE void Cy_TCPWM_ClearInterrupt(TCPWM_Type *base, uint32_t cntNum,
base->CNT[cntNum].INTR = source; base->CNT[cntNum].INTR = source;
unused = base->CNT[cntNum].INTR; unused = base->CNT[cntNum].INTR;
(void)unused;
} }