summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMengsk <[email protected]>2022-12-29 21:02:10 +0100
committerMengsk <[email protected]>2022-12-29 21:37:44 +0100
commit0bd41d53549183576553ec2fb84f00926c25e44c (patch)
tree9af0605dfc7e72911cf4311575eb4a59ffeabf85 /src
parente4f07206f8cbb177f3515f1fdbd5ed1f8cc9f668 (diff)
Fix CI.
Diffstat (limited to 'src')
-rw-r--r--src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c4
-rw-r--r--src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
index 59f155111..f3b55cd75 100644
--- a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
+++ b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
@@ -178,7 +178,8 @@ TU_ATTR_ALWAYS_INLINE static inline xfer_ctl_t* xfer_ctl_ptr(uint32_t ep_addr)
{
uint8_t epnum = tu_edpt_number(ep_addr);
uint8_t dir = tu_edpt_dir(ep_addr);
- TU_ASSERT(epnum < MAX_EP_COUNT);
+ // Fix -Werror=null-dereference
+ TU_ASSERT(epnum < MAX_EP_COUNT, &xfer_status[0][0]);
return &xfer_status[epnum][dir];
}
@@ -1004,7 +1005,6 @@ bool dcd_edpt_iso_activate(uint8_t rhport, tusb_desc_endpoint_t const * p_endpo
{
(void)rhport;
uint8_t const epnum = xfer_ctl_ptr(p_endpoint_desc->bEndpointAddress)->epnum;
- uint8_t const dir = tu_edpt_dir(p_endpoint_desc->bEndpointAddress);
const uint16_t packet_size = tu_edpt_packet_size(p_endpoint_desc);
uint16_t pma_addr;
diff --git a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h
index b64776fc9..382374614 100644
--- a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h
+++ b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h
@@ -234,7 +234,7 @@ TU_ATTR_ALWAYS_INLINE static inline void pcd_set_ep_cnt_reg(__O uint16_t * pdwRe
/* There should be no remainder in the above calculation */
TU_ASSERT((wCount - (numblocks * (blocksize ? 32 : 2))) == 0, /**/);
- /* Encode into register. When BLSIZE==1, we need to substract 1 block count */
+ /* Encode into register. When BLSIZE==1, we need to subtract 1 block count */
*pdwReg = (blocksize << 15) | ((numblocks - blocksize) << 10);
}