diff options
| author | Cédric Berger <[email protected]> | 2025-12-26 17:27:05 +0100 |
|---|---|---|
| committer | Cédric Berger <[email protected]> | 2025-12-26 17:27:05 +0100 |
| commit | d77f1e8eb6f53cdb55987165b36e301daf1f9828 (patch) | |
| tree | 84482370893feae4f9e0a39e98d9cd7e04b005fc /src | |
| parent | b3dd0a113adefd1493dbd1417ece346528951b1d (diff) | |
Prevent unused-variable warning in dcd_host.c
'idx' is not used if CFG_TUH_CDC_LINE_CODING_ON_ENUM is not defined.
Diffstat (limited to 'src')
| -rw-r--r-- | src/class/cdc/cdc_host.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/class/cdc/cdc_host.c b/src/class/cdc/cdc_host.c index 32f6827b0..f19c4a327 100644 --- a/src/class/cdc/cdc_host.c +++ b/src/class/cdc/cdc_host.c @@ -828,7 +828,9 @@ static bool set_line_state_on_enum(cdch_interface_t *p_cdc, tuh_xfer_t *xfer) { ENUM_SET_LINE_CONTROL, ENUM_SET_LINE_COMPLETE, }; + #ifdef CFG_TUH_CDC_LINE_CODING_ON_ENUM const uint8_t idx = get_idx_by_ptr(p_cdc); + #endif const uintptr_t state = xfer->user_data; switch (state) { |
