Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent unreachable statements and correct variable sizes. #11470

Merged
merged 1 commit into from
Sep 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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