diff options
| author | Ben Avison <[email protected]> | 2022-09-01 14:29:30 +0100 |
|---|---|---|
| committer | Ben Avison <[email protected]> | 2022-09-13 18:00:51 +0100 |
| commit | caff3b5c54615a0cc4e35dadffb99af543d0165f (patch) | |
| tree | f57954a813543737a1151509629ffd7a71b16a33 /src | |
| parent | 6a2d01bae47d2660dc2d10941e767fc0bc0e97bc (diff) | |
Remove unused static data
This affects struct rspMsg in usbtmc_app.c (unconditionally) and uint8_t
termChar in usbtmc_device.c (when NDEBUG is defined). IAR generates warning
Pe550 'variable was set but never used'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/class/usbtmc/usbtmc_device.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/class/usbtmc/usbtmc_device.c b/src/class/usbtmc/usbtmc_device.c index 64db85fcf..e96990c49 100644 --- a/src/class/usbtmc/usbtmc_device.c +++ b/src/class/usbtmc/usbtmc_device.c @@ -154,7 +154,9 @@ TU_VERIFY_STATIC(USBTMCD_BUFFER_SIZE >= 32u,"USBTMC dev buffer size too small"); static bool handle_devMsgOutStart(uint8_t rhport, void *data, size_t len); static bool handle_devMsgOut(uint8_t rhport, void *data, size_t len, size_t packetLen); +#ifndef NDEBUG static uint8_t termChar; +#endif static uint8_t termCharRequested = false; osal_mutex_def_t usbtmcLockBuffer; @@ -440,7 +442,9 @@ static bool handle_devMsgIn(void *data, size_t len) usbtmc_state.transfer_size_sent = 0u; termCharRequested = msg->bmTransferAttributes.TermCharEnabled; +#ifndef NDEBUG termChar = msg->TermChar; +#endif if(termCharRequested) TU_VERIFY(usbtmc_state.capabilities->bmDevCapabilities.canEndBulkInOnTermChar); |
