mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-30 04:20:26 +00:00
suppres compiler warning transfer of control bypasses initialization
This commit is contained in:
parent
958512a5bd
commit
2502be94f7
@ -149,9 +149,12 @@ OSAL_TASK_FUNCTION( msc_app_task ) (void* p_task_para)
|
||||
{
|
||||
OSAL_TASK_LOOP_BEGIN
|
||||
|
||||
bool is_any_disk_mounted;
|
||||
|
||||
osal_task_delay(10);
|
||||
|
||||
bool is_any_disk_mounted = false;
|
||||
is_any_disk_mounted = false;
|
||||
|
||||
for(uint8_t phy_disk=0; phy_disk < TUSB_CFG_HOST_DEVICE_MAX; phy_disk++)
|
||||
{
|
||||
if ( disk_is_ready(phy_disk) )
|
||||
|
@ -95,8 +95,10 @@ tusb_error_t hub_port_clear_feature_subtask(uint8_t hub_addr, uint8_t hub_port,
|
||||
SUBTASK_ASSERT_STATUS( error );
|
||||
|
||||
//------------- Check if feature is cleared -------------//
|
||||
{ // suppres compiler warning transfer of control bypasses initialization
|
||||
hub_port_status_response_t * p_port_status = (hub_port_status_response_t *) hub_enum_buffer;
|
||||
SUBTASK_ASSERT( !BIT_TEST_(p_port_status->status_change.value, feature-16) );
|
||||
}
|
||||
|
||||
OSAL_SUBTASK_END
|
||||
}
|
||||
@ -127,9 +129,11 @@ tusb_error_t hub_port_reset_subtask(uint8_t hub_addr, uint8_t hub_port)
|
||||
);
|
||||
SUBTASK_ASSERT_STATUS( error );
|
||||
|
||||
{ // suppres compiler warning transfer of control bypasses initialization
|
||||
hub_port_status_response_t * p_port_status = (hub_port_status_response_t *) hub_enum_buffer;
|
||||
SUBTASK_ASSERT ( p_port_status->status_change.reset && p_port_status->status_current.connect_status &&
|
||||
p_port_status->status_current.port_power && p_port_status->status_current.port_enable);
|
||||
}
|
||||
|
||||
OSAL_SUBTASK_END
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user