Merge pull request #11470 from hugueskamba/hk-fix-warnings

Prevent unreachable statements and correct variable sizes.
pull/11523/head
Martin Kojtal 2019-09-19 10:36:39 +02:00 committed by GitHub
commit 6fcd29769c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 7 deletions

View File

@ -373,8 +373,8 @@ private:
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];

View File

@ -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()

View File

@ -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
}

View File

@ -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