Skip to content

Commit

Permalink
Prevent unreachable statements and correct variable sizes.
Browse files Browse the repository at this point in the history
  • Loading branch information
hugueskamba committed Sep 12, 2019
1 parent 306e144 commit 2163d07
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions drivers/USBAudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ class USBAudio: protected USBDevice {
usb_ep_t _episo_in; // tx endpoint

// channel config in the configuration descriptor: master, left, right
uint8_t _channel_config_rx;
uint8_t _channel_config_tx;
uint16_t _channel_config_rx;
uint16_t _channel_config_tx;

// configuration descriptor
uint8_t _config_descriptor[183];
Expand Down
3 changes: 2 additions & 1 deletion rtos/source/Semaphore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ osStatus Semaphore::release(void)
return osErrorResource;
}
} while (!core_util_atomic_cas_s32(&_count, &old_count, old_count + 1));
#endif

return osOK;
#endif // MBED_CONF_RTOS_PRESENT
}

Semaphore::~Semaphore()
Expand Down
1 change: 0 additions & 1 deletion rtos/source/TARGET_CORTEX/mbed_rtos_rtx.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,4 @@ MBED_NORETURN void mbed_rtos_start()

osKernelStart();
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_PLATFORM, MBED_ERROR_CODE_INITIALIZATION_FAILED), "Failed to start RTOS");
while (1); // Code should never get here
}
3 changes: 0 additions & 3 deletions rtos/source/TARGET_CORTEX/mbed_rtx_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ __NO_RETURN uint32_t osRtxErrorNotify(uint32_t code, void *object_id)
MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_KERNEL, MBED_ERROR_CODE_UNKNOWN), "CMSIS-RTOS error: Unknown", code);
break;
}

/* That shouldn't be reached */
for (;;) {}
}

#if defined(MBED_TRAP_ERRORS_ENABLED) && MBED_TRAP_ERRORS_ENABLED
Expand Down

0 comments on commit 2163d07

Please sign in to comment.