diff options
| author | Ben Avison <[email protected]> | 2022-09-01 14:33:04 +0100 |
|---|---|---|
| committer | Ben Avison <[email protected]> | 2022-09-13 18:00:51 +0100 |
| commit | 62d90c850096277080e4044dd37ef9c18748f06c (patch) | |
| tree | 9cf4cd6089af56e4361ba1bec306697789548cde /src | |
| parent | caff3b5c54615a0cc4e35dadffb99af543d0165f (diff) | |
Move variable into its own curly-brace scope
IAR generates warning Pe546 'transfer of control bypasses initialization of
variable "invInvTag"'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/class/usbtmc/usbtmc_device.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/class/usbtmc/usbtmc_device.c b/src/class/usbtmc/usbtmc_device.c index e96990c49..d7ba02d29 100644 --- a/src/class/usbtmc/usbtmc_device.c +++ b/src/class/usbtmc/usbtmc_device.c @@ -470,8 +470,10 @@ bool usbtmcd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint case STATE_IDLE: TU_VERIFY(xferred_bytes >= sizeof(usbtmc_msg_generic_t)); msg = (usbtmc_msg_generic_t*)(usbtmc_state.ep_bulk_out_buf); - uint8_t invInvTag = (uint8_t)~(msg->header.bTagInverse); - TU_VERIFY(msg->header.bTag == invInvTag); + { + uint8_t invInvTag = (uint8_t)~(msg->header.bTagInverse); + TU_VERIFY(msg->header.bTag == invInvTag); + } TU_VERIFY(msg->header.bTag != 0x00); switch(msg->header.MsgID) { |
