The task name of the two examples is never displayed in the log.
The task is searched based on its name and, if found, set. This doesn't actually make any sense since the task is already the correct object.
I have now made the following correction in task.cpp:
/*============================================================================*/
bool task::setName(const char *tName) noexcept {
bool retValue = false;
const size_t nl = util::strlen(tName, sizeof(name));
/*cstat -MISRAC++2008-5-14-1*/
// if ( ( nullptr != getContainer() ) && ( nl > 0U ) && ( nl < sizeof(name) ) ) {
// if ( nullptr == os.getTaskByName( tName ) ) {
if (nl > 0U && nl < sizeof(name)) {
(void)util::strcpy(name, tName, sizeof(name)); // skipcq: CXX-C1000
retValue = true;
}
// }
// }
// /*cstat +MISRAC++2008-5-14-1*/
return retValue;
}