Skip to content

Commit 0bd41d5

Browse files
committed
Fix CI.
1 parent e4f0720 commit 0bd41d5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ TU_ATTR_ALWAYS_INLINE static inline xfer_ctl_t* xfer_ctl_ptr(uint32_t ep_addr)
178178
{
179179
uint8_t epnum = tu_edpt_number(ep_addr);
180180
uint8_t dir = tu_edpt_dir(ep_addr);
181-
TU_ASSERT(epnum < MAX_EP_COUNT);
181+
// Fix -Werror=null-dereference
182+
TU_ASSERT(epnum < MAX_EP_COUNT, &xfer_status[0][0]);
182183

183184
return &xfer_status[epnum][dir];
184185
}
@@ -1004,7 +1005,6 @@ bool dcd_edpt_iso_activate(uint8_t rhport, tusb_desc_endpoint_t const * p_endpo
10041005
{
10051006
(void)rhport;
10061007
uint8_t const epnum = xfer_ctl_ptr(p_endpoint_desc->bEndpointAddress)->epnum;
1007-
uint8_t const dir = tu_edpt_dir(p_endpoint_desc->bEndpointAddress);
10081008
const uint16_t packet_size = tu_edpt_packet_size(p_endpoint_desc);
10091009
uint16_t pma_addr;
10101010

src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ TU_ATTR_ALWAYS_INLINE static inline void pcd_set_ep_cnt_reg(__O uint16_t * pdwRe
234234
/* There should be no remainder in the above calculation */
235235
TU_ASSERT((wCount - (numblocks * (blocksize ? 32 : 2))) == 0, /**/);
236236

237-
/* Encode into register. When BLSIZE==1, we need to substract 1 block count */
237+
/* Encode into register. When BLSIZE==1, we need to subtract 1 block count */
238238
*pdwReg = (blocksize << 15) | ((numblocks - blocksize) << 10);
239239
}
240240

0 commit comments

Comments
 (0)