mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
fix typo, add -Wno-error=unreachable-code for fuzz due to latest cdc changes
This commit is contained in:
parent
6492f4a18d
commit
19400c8556
@ -88,7 +88,7 @@ void net_task(FuzzedDataProvider *provider) {
|
||||
case kNetworkCanXmit:
|
||||
(void)tud_network_can_xmit(provider->ConsumeIntegral<uint16_t>());
|
||||
case kNetworkXmit:
|
||||
// TODO: Actuall pass real values here later.
|
||||
// TODO: Actually pass real values here later.
|
||||
tud_network_xmit(NULL, 0);
|
||||
|
||||
case kMaxValue:
|
||||
@ -96,4 +96,4 @@ void net_task(FuzzedDataProvider *provider) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -72,6 +72,7 @@ CFLAGS += \
|
||||
-O1
|
||||
|
||||
CFLAGS += \
|
||||
-Wno-error=unreachable-code \
|
||||
-DOPT_MCU_FUZZ=1 \
|
||||
-DCFG_TUSB_MCU=OPT_MCU_FUZZ
|
||||
|
||||
|
@ -171,6 +171,7 @@ uint32_t tud_cdc_n_write(uint8_t itf, void const* buffer, uint32_t bufsize)
|
||||
uint16_t ret = tu_fifo_write_n(&p_cdc->tx_ff, buffer, (uint16_t) bufsize);
|
||||
|
||||
// flush if queue more than packet size
|
||||
// may need to suppress -Wunreachable-code since most of the time CFG_TUD_CDC_TX_BUFSIZE < BULK_PACKET_SIZE
|
||||
if ( (tu_fifo_count(&p_cdc->tx_ff) >= BULK_PACKET_SIZE) || ((CFG_TUD_CDC_TX_BUFSIZE < BULK_PACKET_SIZE) && tu_fifo_full(&p_cdc->tx_ff)) )
|
||||
{
|
||||
tud_cdc_n_write_flush(itf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user