Skip to content

Commit ab8b573

Browse files
committed
FUTURE_SEQUANA: Clean up "unused variable" compiler warnings
Clean up compiler warnings coming from PDL read-out of peripheral interrupt status registers.
1 parent ffe9ddf commit ab8b573

File tree

7 files changed

+17
-0
lines changed

7 files changed

+17
-0
lines changed

targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ctdac.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,7 @@ __STATIC_INLINE void Cy_CTDAC_ClearInterrupt(CTDAC_Type *base)
928928

929929
/* Dummy read for buffered writes. */
930930
unused = base->INTR;
931+
(void)unused;
931932
}
932933

933934
/*******************************************************************************

targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_gpio.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,7 @@ __STATIC_INLINE void Cy_GPIO_ClearInterrupt(GPIO_PRT_Type* base, uint32_t pinNum
15771577

15781578
/* This read ensures that the initial write has been flushed out to the hardware */
15791579
unused = base->INTR;
1580+
(void)unused;
15801581
}
15811582

15821583

targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_ipc_drv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,7 @@ __STATIC_INLINE void Cy_IPC_Drv_ClearInterrupt(IPC_INTR_STRUCT_Type* base, uint
622622
base->INTR = _VAL2FLD(IPC_INTR_STRUCT_INTR_NOTIFY, ipcNotifyMask) |
623623
_VAL2FLD(IPC_INTR_STRUCT_INTR_RELEASE, ipcReleaseMask);
624624
unused = base->INTR; /* Read the register to flush the cache */
625+
(void)unused;
625626
}
626627

627628
/** \} group_ipc_functions */

targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_sar.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,6 +1564,7 @@ __STATIC_INLINE void Cy_SAR_ClearInterrupt(SAR_Type *base, uint32_t intrMask)
15641564

15651565
/* Dummy read for buffered writes. */
15661566
unused = base->INTR;
1567+
(void)unused;
15671568
}
15681569

15691570
/*******************************************************************************
@@ -1720,6 +1721,7 @@ __STATIC_INLINE void Cy_SAR_ClearRangeInterrupt(SAR_Type *base, uint32_t chanMas
17201721

17211722
/* Dummy read for buffered writes. */
17221723
unused = base->RANGE_INTR;
1724+
(void)unused;
17231725
}
17241726

17251727
/*******************************************************************************
@@ -1863,6 +1865,7 @@ __STATIC_INLINE void Cy_SAR_ClearSatInterrupt(SAR_Type *base, uint32_t chanMask)
18631865

18641866
/* Dummy read for buffered writes. */
18651867
unused = base->SATURATE_INTR;
1868+
(void)unused;
18661869
}
18671870

18681871
/*******************************************************************************

targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_scb_common.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,7 @@ __STATIC_INLINE void Cy_SCB_ClearRxFifo(CySCB_Type* base)
666666
base->RX_FIFO_CTRL &= (uint32_t) ~SCB_RX_FIFO_CTRL_CLEAR_Msk;
667667

668668
unused = base->RX_FIFO_CTRL;
669+
(void)unused;
669670
}
670671

671672

@@ -793,6 +794,7 @@ __STATIC_INLINE void Cy_SCB_ClearTxFifo(CySCB_Type *base)
793794
base->TX_FIFO_CTRL &= (uint32_t) ~SCB_TX_FIFO_CTRL_CLEAR_Msk;
794795

795796
unused = base->TX_FIFO_CTRL;
797+
(void)unused;
796798
}
797799

798800

@@ -968,6 +970,7 @@ __STATIC_INLINE void Cy_SCB_ClearRxInterrupt(CySCB_Type *base, uint32_t interrup
968970

969971
base->INTR_RX = interruptMask;
970972
unused = base->INTR_RX;
973+
(void)unused;
971974
}
972975

973976

@@ -1116,6 +1119,7 @@ __STATIC_INLINE void Cy_SCB_ClearTxInterrupt(CySCB_Type *base, uint32_t interrup
11161119

11171120
base->INTR_TX = interruptMask;
11181121
unused = base->INTR_TX;
1122+
(void)unused;
11191123
}
11201124

11211125

@@ -1255,6 +1259,7 @@ __STATIC_INLINE void Cy_SCB_ClearMasterInterrupt(CySCB_Type *base, uint32_t inte
12551259

12561260
base->INTR_M = interruptMask;
12571261
unused = base->INTR_M;
1262+
(void)unused;
12581263
}
12591264

12601265

@@ -1396,6 +1401,7 @@ __STATIC_INLINE void Cy_SCB_ClearSlaveInterrupt(CySCB_Type *base, uint32_t inter
13961401

13971402
base->INTR_S = interruptMask;
13981403
unused = base->INTR_S;
1404+
(void)unused;
13991405
}
14001406

14011407

@@ -1534,6 +1540,7 @@ __STATIC_INLINE void Cy_SCB_ClearI2CInterrupt(CySCB_Type *base, uint32_t interru
15341540

15351541
base->INTR_I2C_EC = interruptMask;
15361542
unused = base->INTR_I2C_EC;
1543+
(void)unused;
15371544
}
15381545

15391546

@@ -1649,6 +1656,7 @@ __STATIC_INLINE void Cy_SCB_ClearSpiInterrupt(CySCB_Type *base, uint32_t interru
16491656

16501657
base->INTR_SPI_EC = interruptMask;
16511658
unused = base->INTR_SPI_EC;
1659+
(void)unused;
16521660
}
16531661

16541662
/** \cond INTERNAL */
@@ -1734,6 +1742,7 @@ __STATIC_INLINE void Cy_SCB_FwBlockReset(CySCB_Type *base)
17341742
base->CTRL |= (uint32_t) SCB_CTRL_ENABLED_Msk;
17351743

17361744
unused = base->CTRL;
1745+
(void)unused;
17371746
}
17381747

17391748

targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_sysclk.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2085,6 +2085,7 @@ __STATIC_INLINE cy_en_sysclk_status_t
20852085
_VAL2FLD(PERI_DIV_CMD_TYPE_SEL, dividerType) |
20862086
_VAL2FLD(PERI_DIV_CMD_DIV_SEL, dividerNum);
20872087
unused = PERI->DIV_CMD; /* dummy read to handle buffered writes */
2088+
(void)unused;
20882089
retval = CY_SYSCLK_SUCCESS;
20892090
}
20902091
}

targets/TARGET_Cypress/TARGET_PSOC6_FUTURE/device/drivers/include/cy_tcpwm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ __STATIC_INLINE void Cy_TCPWM_ClearInterrupt(TCPWM_Type *base, uint32_t cntNum,
539539

540540
base->CNT[cntNum].INTR = source;
541541
unused = base->CNT[cntNum].INTR;
542+
(void)unused;
542543
}
543544

544545

0 commit comments

Comments
 (0)